babel
Exhibit.js builder plugin
Transforms JavaScript files using Babel.
$ npm install -D exhibit-builder-babel
Usage
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