Add build script

This commit is contained in:
Michael Jackson
2017-03-24 18:05:25 -07:00
parent fc5a9311f1
commit 3f8cbe1a5c
2 changed files with 18 additions and 4 deletions

16
tools/build.js Normal file
View 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'
})
})