Noncollinear Perpendicular Microcrystalline
Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

babel-jsm-plugin

1.0.2 • Public • Published

babel-jsm-plugin

Babel plugin for converting ES6 modules into JavaScript code modules (JSM).

This is a Babel plugin and it supersedes the olds way of doing module formatters. This plugin allows you to write ES6 code and export a JSM module which can be used for Gecko development or for add-on authors.

Usage

Install:

npm install babel babel-core babel-jsm-plugin --save-dev

Comamnd line:

babel --modules ignore --plugins babel-jsm-plugin myfile.js --out-file myfile.jsm

From node, or node based task runner:

require("babel").transform("code", { plugins: ["babel-jsm-plugin"] });

From browserify:

var b = browserify({
  // browserifyoptions
}).transform(
  babelify.configure({
    plugins: ["babel-jsm-plugin"]
  })
);

Keywords

none

Install

npm i babel-jsm-plugin

DownloadsWeekly Downloads

9

Version

1.0.2

License

MPL-2.0

Last publish

Collaborators

  • avatar