Created
January 5, 2017 22:13
-
-
Save CHH/1c3fe5ebe89651d4886a0820b8e3c025 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const {run} = require('runjs') | |
const fractal = require('./frontend/fractal.js') | |
const task = { | |
'build': () => { | |
task['webpack:build']() | |
task['fractal:build']() | |
}, | |
'watch': () => { | |
task['webpack:watch']() | |
task['fractal:watch']() | |
}, | |
'webpack:build': () => { | |
run(`NODE_ENV=production parallel-webpack --config=./parallel.webpack.config.js --max-retries=1`) | |
}, | |
'webpack:watch': () => { | |
run(`parallel-webpack --no-stats --config=./parallel.webpack.config.js -p=2 --watch`, {async: true}) | |
}, | |
'fractal:build': () => { | |
const builder = fractal.web.builder() | |
builder.build().then(() => { | |
console.log("fractal build complete") | |
}) | |
}, | |
'fractal:watch': () => { | |
const server = fractal.web.server({ | |
sync: true, | |
}) | |
server.start() | |
} | |
} | |
module.exports = task |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment