mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 10:27:49 +00:00
Update _.defer build dependencies.
Former-commit-id: 159f541373b01f259c9509e16c3fc0c2018e6d51
This commit is contained in:
9
build.js
9
build.js
@@ -79,7 +79,7 @@
|
|||||||
'countBy': ['forEach', 'identity', 'isEqual', 'keys'],
|
'countBy': ['forEach', 'identity', 'isEqual', 'keys'],
|
||||||
'debounce': [],
|
'debounce': [],
|
||||||
'defaults': ['isArray', 'forEach', 'forOwn'],
|
'defaults': ['isArray', 'forEach', 'forOwn'],
|
||||||
'defer': [],
|
'defer': ['bind'],
|
||||||
'delay': [],
|
'delay': [],
|
||||||
'difference': ['indexOf'],
|
'difference': ['indexOf'],
|
||||||
'escape': [],
|
'escape': [],
|
||||||
@@ -1526,8 +1526,8 @@
|
|||||||
useUnderscoreClone = methods.indexOf('clone') < 0;
|
useUnderscoreClone = methods.indexOf('clone') < 0;
|
||||||
}
|
}
|
||||||
// update dependencies
|
// update dependencies
|
||||||
if (isModern || isUnderscore) {
|
if (isLegacy) {
|
||||||
dependencyMap.reduceRight = _.without(dependencyMap.reduceRight, 'isEqual', 'isString');
|
dependencyMap.defer = _.without(dependencyMap.defer, 'bind');
|
||||||
}
|
}
|
||||||
if (isUnderscore) {
|
if (isUnderscore) {
|
||||||
dependencyMap.contains = _.without(dependencyMap.contains, 'isString');
|
dependencyMap.contains = _.without(dependencyMap.contains, 'isString');
|
||||||
@@ -1555,6 +1555,9 @@
|
|||||||
dependencyMap.clone = _.without(dependencyMap.clone, 'forEach', 'forOwn');
|
dependencyMap.clone = _.without(dependencyMap.clone, 'forEach', 'forOwn');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (isModern || isUnderscore) {
|
||||||
|
dependencyMap.reduceRight = _.without(dependencyMap.reduceRight, 'isEqual', 'isString');
|
||||||
|
}
|
||||||
|
|
||||||
// add method names explicitly
|
// add method names explicitly
|
||||||
if (includeMethods.length) {
|
if (includeMethods.length) {
|
||||||
|
|||||||
@@ -1200,6 +1200,7 @@
|
|||||||
'include=once plus=bind,Chaining',
|
'include=once plus=bind,Chaining',
|
||||||
'category=collections,functions',
|
'category=collections,functions',
|
||||||
'backbone legacy category=utilities minus=first,last',
|
'backbone legacy category=utilities minus=first,last',
|
||||||
|
'legacy include=defer',
|
||||||
'underscore include=debounce,throttle plus=after minus=throttle',
|
'underscore include=debounce,throttle plus=after minus=throttle',
|
||||||
'underscore mobile strict category=functions exports=amd,global plus=pick,uniq',
|
'underscore mobile strict category=functions exports=amd,global plus=pick,uniq',
|
||||||
]
|
]
|
||||||
@@ -1214,13 +1215,13 @@
|
|||||||
var command = origCommand;
|
var command = origCommand;
|
||||||
|
|
||||||
if (index == 1) {
|
if (index == 1) {
|
||||||
if (/mobile/.test(command)) {
|
if (/legacy|mobile/.test(command)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
command = 'mobile ' + command;
|
command = 'mobile ' + command;
|
||||||
}
|
}
|
||||||
if (index == 2) {
|
if (index == 2) {
|
||||||
if (/modern/.test(command)) {
|
if (/legacy|modern/.test(command)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
command = 'modern ' + command;
|
command = 'modern ' + command;
|
||||||
|
|||||||
Reference in New Issue
Block a user