Skip to content

peterood/broccoli-babel-transpiler

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

broccoli-babel-transpiler

Build Status

A Broccoli plugin which transpiles ES6 to readable ES5 by using babel.

How to install?

$ npm install broccoli-babel-transpiler --save-dev

How to use?

In your Brocfile.js:

var esTranspiler = require('broccoli-babel-transpiler');
var scriptTree = esTranspiler(inputTree, options);

You can find options at babel's github repo.

About source map

Currently this plugin only supports inline source map. If you need separate source map feature, you're welcome to submit a pull request.

Advanced usage

filterExtensions is an option to limit (or expand) the set of file extensions that will be transformed.

The default filterExtension is js

var esTranspiler = require('broccoli-babel-transpiler');
var scriptTree = esTranspiler(inputTree, {
    filterExtensions:['js', 'es6'] // babelize both .js and .es6 files
});

About

Broccoli plugin for babel

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%