Added UMD approach to the module
This commit is contained in:
parent
88c3f2d1a7
commit
c8360385e7
@ -3,7 +3,15 @@
|
|||||||
// For all details and documentation:
|
// For all details and documentation:
|
||||||
// https://github.com/homeslicesolutions/backbone-model-file-upload
|
// 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
|
// Clone the original Backbone.Model.prototype
|
||||||
var backboneModelClone = _.clone( Backbone.Model.prototype );
|
var backboneModelClone = _.clone( Backbone.Model.prototype );
|
||||||
@ -114,4 +122,4 @@
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}(_, Backbone);
|
}));
|
||||||
|
Loading…
Reference in New Issue
Block a user