babel-plugin-wrap-modules-amd

2.32.0 • Public • Published

babel-plugin-wrap-modules-amd

Wrap modules inside an AMD define() module.

Example

In

var console = require('console');
console.info('Say something');

Out

define(['module', 'exports', 'require', 'console'], function (
	module,
	exports,
	require
) {
	var console = require('console');
	console.log('Say something');
});

Installation

npm install --save-dev babel-plugin-wrap-modules-amd

Usage

Add the following to your .babelrc file:

{
	"plugins": ["wrap-modules-amd"]
}

Technical Details

This plugin wraps the code inside the module with an AMD define() call. The module is not given any name and any dependencies detected by inspecting require() calls are appended to the define() dependencies array so that they can be found when require() is called.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.32.02,767latest
3.0.0-alpha.60alpha
2.18.2-alpha.00canary

Version History

VersionDownloads (Last 7 Days)Published
2.32.02,767
3.0.0-alpha.60
2.31.2752
2.31.11
2.31.0118
2.30.0324
2.29.0280
2.28.3565
2.28.280
2.28.13
2.28.091
2.27.0151
2.26.0255
2.25.09
2.24.374
2.24.2242
2.24.130
2.24.011
2.23.0108
2.22.161
2.22.00
2.21.00
2.20.012
2.19.482
2.19.32
2.19.245
2.19.152
2.19.02
2.18.853
2.18.70
2.18.620
2.18.571
2.18.417
2.18.30
2.18.2274
2.18.2-alpha.00
2.18.15
2.18.02
2.17.10
2.17.02
2.16.24
2.16.114
2.16.034
2.15.10
2.15.01
2.14.2-alpha.00
2.14.16
2.14.020
2.6.3-alpha.1260
2.13.3-alpha.81
2.13.3-alpha.60
2.13.336
2.13.211
2.13.13
2.14.0-alpha.ef89583a0
2.14.0-alpha.17da64bb1
2.14.0-alpha.1874c5680
2.13.00
2.12.01
2.11.01
2.10.01
2.9.00
2.8.00
2.7.13
2.7.017
2.6.23
2.6.10
2.6.01
2.5.10
2.6.0-alpha.c8357d7f1
2.5.00
2.5.0-alpha.eefe28fb1
2.5.0-alpha.05bef2c11
2.4.00
2.3.11
2.3.00
2.2.11
2.2.01
2.1.10
1.8.049
2.1.00
1.7.00
2.0.10
2.0.00
2.0.0-rc.41
2.0.0-rc.30
2.0.0-rc.20
2.0.0-rc.11
1.7.0-alpha.6d6b0c8b1
1.6.20
1.7.0-alpha.cec3fa452
1.7.0-alpha.e4d06b301
1.7.0-alpha.37376d141
1.7.0-alpha.2956f2060
1.7.0-alpha.1b73ffed0
1.7.0-alpha.43ab330a1
1.7.0-alpha.0e246ccd0
1.6.11
1.7.0-alpha.1158492a0
1.7.0-alpha.b6bde8b00
1.6.00
1.6.0-alpha.fa6ec3380
1.5.00
1.4.20
1.4.00
1.2.30
1.2.20
1.2.10
1.2.00
1.1.02
1.0.00
0.7.00
0.6.00
0.5.00
0.4.12
0.4.00
0.3.00
0.2.30
0.2.00
0.1.00

Package Sidebar

Install

npm i babel-plugin-wrap-modules-amd

Weekly Downloads

6,787

Version

2.32.0

License

none

Unpacked Size

13.1 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