Skip to content
This repository has been archived by the owner on Oct 9, 2020. It is now read-only.

systemjs/babel-plugin-transform-system-register

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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);
      }
    }]
  ]
});

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published