tauri/mode/bin/tauri-build.js
nothingismagick b93bded180
feat(cli) [WIP] (#34)
* feat(cli) init tauri mode

Signed-off-by: Daniel Thompson-Yvetot <denjell@quasar.dev>

* feat(cli:init) add force & logging flags, full JSDoc

Signed-off-by: Daniel Thompson-Yvetot <denjell@quasar.dev>

* feat(cli:init) remove console.log

Signed-off-by: Daniel Thompson-Yvetot <denjell@quasar.dev>

* feat(cli:dev) get rust compile to finish

Signed-off-by: Daniel Thompson-Yvetot <denjell@quasar.dev>

* feat(cli:build) get rust compile to finish

Signed-off-by: Daniel Thompson-Yvetot <denjell@quasar.dev>

* feat(cli) set template with current working defaults

Signed-off-by: Daniel Thompson-Yvetot <denjell@quasar.dev>

* chore(version) bump

Signed-off-by: Daniel Thompson-Yvetot <denjell@quasar.dev>

* fix(typo)

Signed-off-by: Daniel Thompson-Yvetot <denjell@quasar.dev>

* fix(template): missing name warning

Signed-off-by: Daniel Thompson-Yvetot <denjell@quasar.dev>

* fix(bundler): correct repository link

Signed-off-by: Daniel Thompson-Yvetot <denjell@quasar.dev>

* feat(lib|cli) read config from tauriDir

* chore(cli) remove console.log statement

* fix(embedded-server) JS content type

* feat(template): add rust2018 flag

* feat(cli): cleanup
2019-10-07 20:36:56 +02:00

37 lines
688 B
JavaScript

const
parseArgs = require('minimist')
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)
}
const { tauriDir } = require('../helpers/app-paths'),
Runner = require('../runner'),
tauri = new Runner({modeDir: tauriDir}),
tauriConfig = require('../helpers/tauri-config')({
ctx: {
debug: argv.debug
}
})
require('../generator').generate(tauriConfig.tauri)
require('../entry').generate(tauriDir, tauriConfig)
tauri.build(tauriConfig)