- Copy
package.jsonand.babelrcinto your project directory. npm installmkdir src && mkdir dist- Put your code in
src npm run buildornpm run watchfor live rebuilding.- Serve up the
distfolder however you like.
Created
March 7, 2017 18:00
-
-
Save nybblr/2afa8917b71bde6492c40c3a7b749ce1 to your computer and use it in GitHub Desktop.
ES2017 build pipeline in 5 seconds.
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
Show hidden characters
| { | |
| "presets": [ | |
| "es2015", | |
| "es2016", | |
| "es2017" | |
| ], | |
| "plugins": [] | |
| } |
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
| { | |
| "name": "my-app", | |
| "version": "1.0.0", | |
| "description": "", | |
| "main": "index.js", | |
| "scripts": { | |
| "build": "browserify -d src/index.js -o dist/index.js", | |
| "watch": "watchify -v -d src/index.js -o dist/index.js" | |
| }, | |
| "browserify": { | |
| "transform": [ [ "babelify", { "sourceMap": true } ] ] | |
| }, | |
| "author": "", | |
| "license": "ISC", | |
| "devDependencies": { | |
| "babel-cli": "^6.16.0", | |
| "babel-core": "^6.17.0", | |
| "babel-polyfill": "^6.16.0", | |
| "babel-preset-es2015": "^6.16.0", | |
| "babel-preset-es2016": "^6.16.0", | |
| "babel-preset-es2017": "^6.16.0", | |
| "babelify": "^7.3.0", | |
| "browserify": "^13.0.1", | |
| "watchify": "^3.7.0" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment