1 | const { shell } = require('execa')
|
2 | const getSpinner = require('../utils/getSpinner')
|
3 | const { success } = require('../utils/tip')
|
4 | module.exports = async function() {
|
5 | const spinner = getSpinner('Building...')
|
6 | try {
|
7 | let env = process.argv[3] || 'dev'
|
8 | spinner.start()
|
9 | await shell(
|
10 | `node node_modules/fire-scripts/bin/index build NODE_ENV=${env}`
|
11 | )
|
12 | success('\n √ build completed!')
|
13 | spinner.stop()
|
14 | } catch (e) {
|
15 | spinner.stop()
|
16 | console.log(e)
|
17 | }
|
18 | }
|