Version: 1.0.0-alpha.01.0.0-alpha.11.0.0-alpha.21.0.0-alpha.31.0.0-alpha.41.0.0-alpha.51.0.0-alpha.61.0.0-alpha.71.0.0-alpha.81.0.0-alpha.91.0.0-alpha.101.0.0-alpha.111.0.0-alpha.121.0.0-alpha.131.0.0-alpha.141.0.0-alpha.151.0.0-alpha.161.0.0-alpha.171.0.0-alpha.181.0.0-alpha.191.0.0-alpha.201.0.0-alpha.211.0.0-alpha.221.0.0-alpha.231.0.0-alpha.241.0.0-alpha.251.0.0-alpha.261.0.0-alpha.271.0.0-alpha.281.0.0-alpha.291.0.0-alpha.301.0.0-alpha.311.0.0-alpha.321.0.0-alpha.331.0.0-alpha.341.0.01.1.01.2.01.3.0
#!/usr/bin/env node
const build = require('../src/build')
const dev = require('../src/dev')
const task = process.argv.slice(2)[0] || 'build'
;(async () => {
switch(task) {
case 'dev':
await dev()
break
case 'build':
try {
await build()
process.exit(0)
}
catch(error) {
console.error('Build failed :(', error)
process.exit(1)
default:
throw new Error('Unknown option. Only `dev` and `build` are supported.')
})()