es6-transpiler-config

1.0.2 • Public • Published

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"{
      "presets": ["es2015"]
    }

    (cf. samples/package.json)

  • create a webpack.config.js:

    let generateConfig = require("es6-transpiler-config");
     
    module.exports = generateConfig("./src/index.js", "./dist/bundle.js");

    (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).

Readme

Keywords

none

Package Sidebar

Install

npm i es6-transpiler-config

Weekly Downloads

2

Version

1.0.2

License

MIT

Last publish

Collaborators

  • fnd