Add build script
This commit is contained in:
16
tools/build.js
Normal file
16
tools/build.js
Normal file
@ -0,0 +1,16 @@
|
||||
const { execSync } = require('child_process')
|
||||
|
||||
console.log('Building CommonJS modules ...')
|
||||
|
||||
execSync('rimraf lib && babel ./modules -d lib --copy-files', {
|
||||
stdio: 'inherit'
|
||||
})
|
||||
|
||||
console.log('\nBuilding client bundles ...')
|
||||
|
||||
execSync('webpack -p --json > stats.json', {
|
||||
stdio: 'inherit',
|
||||
env: Object.assign({}, process.env, {
|
||||
NODE_ENV: 'production'
|
||||
})
|
||||
})
|
Reference in New Issue
Block a user