Babel Build Script to Support Windows and OSX / Linux

Babel Build Script to Support Windows and OSX / Linux

Babel Build Script to Support Windows and OSX / Linux

I have published a gist for those who struggle with the babel build when developing on multiple platforms. If you have any problems with the script or suggestions for improvements, do not hesitate to comment. The gist is MIT licenced, so feel free to use it anywhere.

Note, that you need to change to paths in line 48 and 59, if your sources are in a different folder than lib. This is due to my naming conventions in developing npm packages. I include the script in my package.json in the following way.

 


"scripts": {
"build": "node build.js",
"prepublish": "npm run build",
"test": "mocha --timeout 15000 --compilers js:babel-core/register --recursive \"lib/**/*.tests.js\"",
"test:watch": "npm test -- --watch"
},
...

Leave a Reply

Your email address will not be published. Required fields are marked *