experimenting with ecmascript 2015, 2016 and 2017
JavaScript HTML
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples
src
.babelrc
.eslintignore
.eslintrc.json
.gitignore
README.md
devsum16.md
favicon.ico
index.html
jdays2016.md
package.json
swenug-meetup-2016.md
webpack.config.js

README.md

ES 2015, ES 2016 and ES 2017

Setup

Babel

  • babel-cli
  • babel-core
  • babel-loader (used by webpack)

package.json (npm init, install), "commands"

babel presets

  • babel-preset-latest

.babelrc

babel plugins

babel-polyfill/babel-runtime

Linting

eslint (install and --init)

.eslintrc.*

.eslintignore

Atom

linter-eslint

language-babel

REPL

babel-node or node (v. 6.7.0 or later)

Command line

npm install

babel and eslint

npm scripts:

  • build
  • lint
  • watch

Transpiled code

bundled, minified and source mapped with webpack

ES 2015

(let, const, scope, arrow functions, modules, classes ...)

Callbacks

Promises

Generators

Async with generators and promises

ES 2016

Exponentiation Operator

Array.prototype.includes

ES 2017

Simplified async with async/await