node package manager

esprev

esprev: Babel 6to5

NPM version Downloads

It's Babel 6.x preconfigured with the es2015 and stage-2 presets, and the babel-plugin-add-module-exports plugin to work much like Babel 5.x did.

$ es next.js
$ esprev next.js > prev.js

Install

$ npm install --global esprev

Usage

Type esprev instead of babel when using the CLI:

$ esprev next.js > prev.js
$ esprev-node next.js
$ esprev-doctor
$ esprev-external-helpers

For convenience, esprev-node has also been aliased to just es to make it incredibly easy to execute the future:

$ es make.js

API

Require esprev instead of babel-core for the API:

var babel = require('esprev');

babel.transform(code, options);

Config

Babel handles all of the configuration, so you can use a .babelrc file or babel field in your package.json per usual.


© 2016 Shannon Moeller me@shannonmoeller.com

Licensed under MIT