babel-plugin-transform-system-register

0.0.1 • Public • Published

babel-plugin-transform-system-register

Converts anonymous System.register([] into named System.register('name', [], ...

Example

In

System.register([], function () {});

Out

System.register("foo", [], function () {});

Installation

$ npm install babel-plugin-transform-system-register

Usage

Via .babelrc

.babelrc

{
  "plugins": [
    ["transform-system-register", {
      "moduleName": "foo",
      "systemGlobal": "SystemJS"
    }]
  ]
}

Via CLI

$ babel --plugins transform-system-register script.js

Via Node API (Recommended)

require("babel-core").transform("code", {
  plugins: [
    ["transform-system-register", {
      moduleName: "foo",
      systemGlobal: "SystemJS",
      map: function(name) {
        return normalize(name);
      }
    }]
  ]
});

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.1
    14,411
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.1
    14,411

Package Sidebar

Install

npm i babel-plugin-transform-system-register

Weekly Downloads

14,411

Version

0.0.1

License

MIT

Last publish

Collaborators

  • guybedford
  • asapach