Merge pull request #1 from bildja/patch-1

Added UMD approach to the module - Thanks @bildja!
This commit is contained in:
Joe Vu 2014-08-06 12:18:34 -07:00
commit ac753be726

View File

@ -3,7 +3,15 @@
// For all details and documentation:
// https://github.com/homeslicesolutions/backbone-model-file-upload
!function(_, Backbone){
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['underscore', 'backbone'], factory);
} else {
// Browser globals
factory(_, Backbone);
}
}(this, function(_, Backbone){
// Clone the original Backbone.Model.prototype
var backboneModelClone = _.clone( Backbone.Model.prototype );
@ -114,4 +122,4 @@
});
}(_, Backbone);
}));