-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild-config.js
More file actions
35 lines (31 loc) · 817 Bytes
/
build-config.js
File metadata and controls
35 lines (31 loc) · 817 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
;`use strict`
const args = require(`yargs`).argv
const path = require(`path`)
const pkg = require(`./package.json`)
const isProd = args.compress === true
const isDev = !isProd
const env = isProd ? `production` : `development`
const isRelease = args.release === true
const buildDir = isRelease ? `dist` : `public`
const buildPath = path.resolve(__dirname, buildDir)
const releaseDest = `firebase`
const skipBuild = args.build === false
const skipBump = args.bump === false
const APP_TITLE = `Thailpha${isDev ? ' dev' : ''}`
const iconSource = `data/ios${isDev ? '-dev' : ''}.png`
module.exports = {
isRelease,
buildDir,
buildPath,
isProd,
isDev,
env,
skipBuild,
skipBump,
iconSource,
releaseDest,
APP_TITLE,
APP_DESC: pkg.description,
APP_URL: pkg.homepage,
APP_VERSION: pkg.version,
}