Socket
Socket
Sign inDemoInstall

babel-plugin-namespace-amd-define

Package Overview
Dependencies
1
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
5.9K
increased by25.37%
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

Package last updated on 05 Mar 2024

Did you know?

Socket

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc