2019-08-20 00:09:29 +03:00
|
|
|
const
|
2019-10-07 21:36:56 +03:00
|
|
|
parseArgs = require('minimist')
|
2019-08-20 00:09:29 +03:00
|
|
|
|
|
|
|
const argv = parseArgs(process.argv.slice(2), {
|
|
|
|
alias: {
|
|
|
|
h: 'help',
|
|
|
|
d: 'debug'
|
|
|
|
},
|
|
|
|
boolean: ['h', 'd']
|
|
|
|
})
|
|
|
|
|
|
|
|
if (argv.help) {
|
|
|
|
console.log(`
|
|
|
|
Description
|
|
|
|
Tauri build.
|
|
|
|
Usage
|
|
|
|
$ tauri build
|
|
|
|
Options
|
|
|
|
--help, -h Displays this message
|
|
|
|
`)
|
|
|
|
process.exit(0)
|
|
|
|
}
|
|
|
|
|
2019-10-07 21:36:56 +03:00
|
|
|
const { tauriDir } = require('../helpers/app-paths'),
|
2019-08-20 00:09:29 +03:00
|
|
|
Runner = require('../runner'),
|
2019-10-07 21:36:56 +03:00
|
|
|
tauri = new Runner({modeDir: tauriDir}),
|
2019-08-20 00:09:29 +03:00
|
|
|
tauriConfig = require('../helpers/tauri-config')({
|
|
|
|
ctx: {
|
|
|
|
debug: argv.debug
|
|
|
|
}
|
|
|
|
})
|
2019-10-07 21:36:56 +03:00
|
|
|
|
2019-08-22 00:35:52 +03:00
|
|
|
require('../generator').generate(tauriConfig.tauri)
|
2019-10-07 21:36:56 +03:00
|
|
|
require('../entry').generate(tauriDir, tauriConfig)
|
2019-08-20 00:09:29 +03:00
|
|
|
|
|
|
|
tauri.build(tauriConfig)
|