Sigh plugin for compiling babel files using multiple CPUs/processes.
You will need to npm install --save-dev babel
before using this plugin, it uses your own installation of babel rather than bundling one.
Create a pipeline that transpiles the given source files using babel:
module.exports = function(pipelines) {
pipelines['js'] = [ glob('*.js'), babel(), write('build') ]
}
- getModulePath - A function which turns the relative file path into the module path.
babel({ getModulePath: function(path) { return path.replace(/[^/]+\//, '') })
- modules - A string denoting the type of modules babel should output e.g. amd/common, see the babel API.