1.0.1 • Published 8 years ago

amd-define v1.0.1

Weekly downloads
40
License
ISC
Repository
github
Last release
8 years ago

amd-define

define() for node.js. Load dependencies in AMD-style on node.js

Usage

In yourindex.js:

global.define = require('amd-define')({
    ignoreErrors: false
});

In yourmodule.js:

define('myModule', [
    'backbone', 
    'underscore'
], function(
    Backbone,
    _
) {
    return Backbone.Model.extend({});
});

or

define([
    'backbone', 
    'underscore'
], function(
    Backbone,
    _
) {
    return Backbone.Model.extend({});
});