storybook/scripts/prepublish.js
Aruna Herath 8e0458961a Wrote prepublish in javascript
This allows storybook to be built in windows too.
2016-07-13 17:18:27 +05:30

18 lines
547 B
JavaScript
Executable File

require('shelljs/global')
var path = require('path')
console.log("> Start transpiling ES2015")
rm('-rf', 'dist')
var babel = ['node_modules', '.bin', 'babel'].join(path.sep);
exec(babel + " --ignore __tests__,manager --plugins transform-runtime src --out-dir dist")
if(process.env.DEV_BUILD){
var webpack = ['node_modules', '.bin', 'webpack'].join(path.sep);
var webpackManagerConf = ["scripts", "webpack.manager.conf.js"].join(path.sep);
exec(webpack + " --config " + webpackManagerConf)
}
console.log("> Complete transpiling ES2015")