Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-namespace-amd-define

Package Overview
Dependencies
Maintainers
14
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

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.

  • 2.32.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6.4K
decreased by-0.67%
Maintainers
14
Weekly downloads
 
Created
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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc