No description, website, or topics provided.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib browser.json should be used by lasso Jan 7, 2016
test Added fix and test for raptor.define and raptor.defineClass Nov 5, 2014
.gitignore Initial check-in Jan 2, 2014
.jshintrc Initial check-in Jan 2, 2014
.travis.yml Added .travis.yml Nov 25, 2014
optimizer.json Migrated package.json to optimizer.json Jan 5, 2014
package.json Updated version to 1.1.8 Jan 7, 2016


This modules enabled AMD in the web browser when using RaptorJS 3 by bridging the RaptorJS 3 CommonJS Module Loader with an AMD module loader.


When the code for this module is included on the page, a global require variable and a global define variable are added to the page support AMD. Internally, this module uses a bridge to the RaptorJS CommonJS module loader. This allows an AMD module to be required by a CommonJS module and vice-versa.


npm install raptor-amd --save


This module can be enabled on the page by either requiring the module:


Alternatively, you can add the following dependency to your page's optimizer.json:

    "dependencies": [

If you decide to add the "raptor-amd/optimizer.json" dependency to your optimizer.json then it is not necessary to require the module.


// Define a module named "foo" that exports an object with a name property:
define('foo', function(require, exports, module) { = 'Foo!';

// Dependencies can be added to an array or pulled in using require:
define('bar', ['baz'], function(baz, require, exports, module) {
    var foo = require('foo');
    // Do something with foo...

// You can also use the global require to load the "foo" module:
var foo = require('foo');