amd-shim

1.0.1 • Public • Published

amd-shim

Wraps a javascript file into an AMD module

An Example. Given test.js that assumes there's a foo like so:

function MyVeryImportant() {
    foo();
}

Then with amd-shim.js -e MyVeryImportant -n MyVeryImportant -r foo -w < test.js > test.amd.js gives an AMD module like so:

define('MyVeryImportant', ['foo'], function () {
    function MyVeryImportant() {
        foo();
    }
    return MyVeryImportant;
});

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    1
  • 1.0.0
    0

Package Sidebar

Install

npm i amd-shim

Weekly Downloads

1

Version

1.0.1

License

BSD

Last publish

Collaborators

  • aredridel