simple utility for transpiling ES6 and beyond
While under the hood, webpack and Babel are used, the goal here is to provide a simplified subset so most users don't have to worry about the underlying toolchain.
Getting Started
-
install this repository:
$ npm install --save-dev es6-transpiler-config
-
configure Babel in
package.json
¹:"babel":(cf.
samples/package.json
) -
create a
webpack.config.js
:let generateConfig = ;moduleexports = ;(cf.
samples/webpack.config.js
) -
start transpiling:
$ webpack --progress --colors --watch
(cf. script commands in
samples/package.json
)
¹ While this might also be added to webpack's configuration, that would make it
difficult to use the same Babel configuration across different contexts (e.g.
by calling require("babel-register")
in tests to transpile on demand).