Socket
Socket
Sign inDemoInstall

babel-plugin-namespace-amd-define

Package Overview
Dependencies
178
Maintainers
14
Versions
121
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    babel-plugin-namespace-amd-define

A Babel plugin to namespace (prefix) AMD define() calls.


Version published
Weekly downloads
6.9K
decreased by-13.15%
Maintainers
14
Created
Weekly downloads
 

Readme

Source

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.

FAQs

Last updated on 26 Sep 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc