babel-plugin-namespace-amd-define

2.32.0 • Public • Published

babel-plugin-namespace-amd-define

Add a prefix to AMD define() calls.

Example

In

define([], function () {});

Out

Liferay.Loader.define([], function () {});

Installation

npm install --save-dev babel-plugin-namespace-amd-define

Usage

Add the following to your .babelrc file:

Without options:

{
	"plugins": ["namespace-amd-define"]
}

With options:

{
	"plugins": [
		[
			"namespace-amd-define",
			{
				"namespace": "window.MyProject.Loader"
			}
		]
	]
}

Technical Details and Options

This module adds a prefix to any AMD define() call that it finds. The prefix is specified with the namespace option and a period is inserted between the namespace string and the define() call.

By default, the namespace option is set to Liferay.Loader.

Readme

Keywords

none

Package Sidebar

Install

npm i babel-plugin-namespace-amd-define

Weekly Downloads

7,219

Version

2.32.0

License

none

Unpacked Size

12.5 kB

Total Files

7

Last publish

Collaborators

  • antonio-ortega
  • daniel.sanz
  • izaera-lr
  • edalgrin
  • pat270
  • liferay
  • bryceosterhaus
  • matuzalemteles
  • gagranta
  • p2kmgcl
  • marko.cikos
  • kresimircoko
  • wincent
  • izaera