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-11-16 21:51:46 +03:00
|
|
|
const { tauriDir } = require('../helpers/app-paths')
|
|
|
|
const Runner = require('../runner')
|
|
|
|
const tauri = new Runner({ modeDir: tauriDir })
|
|
|
|
const tauriConfig = require('../helpers/tauri-config')({
|
|
|
|
ctx: {
|
2019-11-24 18:11:06 +03:00
|
|
|
debug: argv.debug,
|
|
|
|
prod: true
|
2019-11-16 21:51:46 +03:00
|
|
|
}
|
|
|
|
})
|
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)
|