-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #308 from kadirahq/prepublish-in-js
Wrote prepublish in javascript
- Loading branch information
Showing
2 changed files
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
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") |