mako-babel

1.0.1 • Public • Published

mako-babel

A plugin that transpiles ES6 code using babel.

npm version coverage npm dependencies npm dev dependencies

Purpose

  • transpiles file.contents using babel
  • can output inline source-maps which mako-js respects during packing
  • respects .babelrc files for configuration (assumes node_modules are precompiled)

API

babel(options)

Available options include:

  • extensions: a list of extensions to compile. (default: js)
  • only: a whitelist of files (globs, functions and regex allowed) to compile (takes precedence over ignore)
  • ignore: a blacklist of files to compile
  • sourceMaps: turn on to enable source maps
  • plugins: list of plugins to include when running babel
  • presets: list of presets to include when running babel

This plugin does not expose a lot of configuration, as using a .babelrc file is encouraged.

NOTE: by default, this module ignores anything in node_modules by default. Any modules should be precompiled before being published to NPM. If there is enough demand for it, I will consider adding configuration for other workflows. (although I will point out it is discouraged by the babel team as far as I can tell)

Readme

Keywords

Package Sidebar

Install

npm i mako-babel

Weekly Downloads

3

Version

1.0.1

License

MIT

Last publish

Collaborators

  • dominicbarnes