exhibit-builder-babel

0.3.1 • Public • Published

babel

Exhibit.js builder plugin

Transforms JavaScript files using Babel.

$ npm install -D exhibit-builder-babel

NPM version Build Status Dependency Status devDependency Status peerDependency Status

Usage

  .use('babel', {stage: 1})

Compiles ES2015+ JavaScript to ES5.

Options

Most of the usual Babel options work as normal, except that I/O-related options won't have any effect. Also, sourceMaps defaults to true in this plugin; otherwise defaults are unchanged.

Additional options

include (string/array/function) — default: '**/*.{js,jsx,babel.js}'

Chooses which files should be compiled. Follows Exhibit’s glob convention.

replaceExt (regular expression) — default: /\.(jsx|babel\.js)$/

A regular expression to select the extension from the incoming filename. This extension will be replaced with .js when outputting compiled files, using file.replace(regex, '.js').


License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i exhibit-builder-babel

Weekly Downloads

0

Version

0.3.1

License

MIT

Last publish

Collaborators

  • callumlocke