Skip to content

Instantly share code, notes, and snippets.

@nybblr
Created Mar 7, 2017
Embed
What would you like to do?
ES2017 build pipeline in 5 seconds.
{
"presets": [
"es2015",
"es2016",
"es2017"
],
"plugins": []
}

Quickstart Build Pipeline for ES2017

  • Copy package.json and .babelrc into your project directory.
  • npm install
  • mkdir src && mkdir dist
  • Put your code in src
  • npm run build or npm run watch for live rebuilding.
  • Serve up the dist folder however you like.
{
"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