UMD Fixes, transformAMDChecks option, Minor Optimizations,
UMD Factory Function Support
This:
(function (factory) {
if (typeof exports === 'object') {
module.exports = factory(require('backbone'), require('underscore'));
} else if (typeof define === 'function' && define.amd) {
define(['backbone', 'underscore'], factory);
}
}(function (Backbone, _) {
Backbone.Validation = (function(_){/*plugin logic*/}(_));
return Backbone.Validation;
}));
Get's Converted To:
(function (factory) {
if (typeof exports === 'object') {
module.exports = factory(amdclean['backbone'], amdclean['underscore']);
} else if (true) {
amdclean['backbonevalidation'] = function (backbone, underscore) {
return factory(backbone, underscore);
}(amdclean['backbone'], amdclean['underscore']);
}
}(function (Backbone, _) {
Backbone.Validation = (function(_){/*plugin logic*/}(_));
return Backbone.Validation;
}));
New transformAMDChecks Option
If set to false
, no conditional AMD checks will be transformed. This is a very helpful option for library authors.
Minor Optimizations
Callback parameters are no longer specified unnecessarily.