Remove underscore
This commit is contained in:
parent
704107a256
commit
9d8ad21819
20 changed files with 111 additions and 226 deletions
32
patches/backbone+1.4.0.patch
Normal file
32
patches/backbone+1.4.0.patch
Normal file
|
@ -0,0 +1,32 @@
|
|||
diff --git a/node_modules/backbone/backbone.js b/node_modules/backbone/backbone.js
|
||||
index 3e09d0d..c650ed6 100644
|
||||
--- a/node_modules/backbone/backbone.js
|
||||
+++ b/node_modules/backbone/backbone.js
|
||||
@@ -12,24 +12,9 @@
|
||||
var root = typeof self == 'object' && self.self === self && self ||
|
||||
typeof global == 'object' && global.global === global && global;
|
||||
|
||||
- // Set up Backbone appropriately for the environment. Start with AMD.
|
||||
- if (typeof define === 'function' && define.amd) {
|
||||
- define(['underscore', 'jquery', 'exports'], function(_, $, exports) {
|
||||
- // Export global even in AMD case in case this script is loaded with
|
||||
- // others that may still expect a global Backbone.
|
||||
- root.Backbone = factory(root, exports, _, $);
|
||||
- });
|
||||
-
|
||||
- // Next for Node.js or CommonJS. jQuery may not be needed as a module.
|
||||
- } else if (typeof exports !== 'undefined') {
|
||||
- var _ = require('underscore'), $;
|
||||
- try { $ = require('jquery'); } catch (e) {}
|
||||
- factory(root, exports, _, $);
|
||||
-
|
||||
- // Finally, as a browser global.
|
||||
- } else {
|
||||
- root.Backbone = factory(root, {}, root._, root.jQuery || root.Zepto || root.ender || root.$);
|
||||
- }
|
||||
+ var _ = require('lodash'), $;
|
||||
+ try { $ = require('jquery'); } catch (e) {}
|
||||
+ factory(root, exports, _, $);
|
||||
|
||||
})(function(root, Backbone, _, $) {
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue