This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

babel-plugin-transform-assign-top-level-to-global

1.0.1 • Public • Published

babel-plugin-transform-assign-top-level-to-global

This plugin transforms all top level declarations to global assignments.

Example

In

function foo() {}
let bar = "";

Out

function foo() {}
global.foo = foo;

let bar = "";
global.bar = bar;

Installation

$ npm install babel-plugin-transform-assign-top-level-to-global

Usage

Via .babelrc (Recommended)

.babelrc

{
  "plugins": ["transform-assign-top-level-to-global"]
}

Via CLI

$ babel --plugins transform-assign-top-level-to-global script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["transform-assign-top-level-to-global"]
});

Readme

Keywords

Package Sidebar

Install

npm i babel-plugin-transform-assign-top-level-to-global

Weekly Downloads

2,556

Version

1.0.1

License

MIT

Last publish

Collaborators

  • sebmck