2019-11-18 00:30:14 +03:00
|
|
|
const parseArgs = require('minimist')
|
2019-08-20 00:09:29 +03:00
|
|
|
|
|
|
|
const argv = parseArgs(process.argv.slice(2), {
|
|
|
|
alias: {
|
2020-03-08 19:39:29 +03:00
|
|
|
h: 'help',
|
|
|
|
e: 'exit-on-panic'
|
2019-08-20 00:09:29 +03:00
|
|
|
},
|
2020-03-08 19:39:29 +03:00
|
|
|
boolean: ['h', 'e']
|
2019-08-20 00:09:29 +03:00
|
|
|
})
|
|
|
|
|
|
|
|
if (argv.help) {
|
|
|
|
console.log(`
|
|
|
|
Description
|
|
|
|
Tauri dev.
|
|
|
|
Usage
|
|
|
|
$ tauri dev
|
|
|
|
Options
|
|
|
|
--help, -h Displays this message
|
|
|
|
`)
|
|
|
|
process.exit(0)
|
|
|
|
}
|
|
|
|
|
2020-03-30 05:41:45 +03:00
|
|
|
async function run () {
|
|
|
|
const dev = require('../dist/api/dev')
|
2019-08-20 00:09:29 +03:00
|
|
|
|
2020-03-30 05:41:45 +03:00
|
|
|
await dev({
|
|
|
|
ctx: {
|
|
|
|
exitOnPanic: argv['exit-on-panic']
|
|
|
|
}
|
|
|
|
}).promise
|
|
|
|
}
|
|
|
|
|
|
|
|
run()
|