mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 17:47:49 +00:00
Update build dependencies.
Former-commit-id: 6a9680a118115e059636a5fc0125c4efa5161765
This commit is contained in:
17
build.js
17
build.js
@@ -70,7 +70,7 @@
|
|||||||
'clone': ['extend', 'forEach', 'forOwn', 'isArguments', 'isPlainObject'],
|
'clone': ['extend', 'forEach', 'forOwn', 'isArguments', 'isPlainObject'],
|
||||||
'compact': [],
|
'compact': [],
|
||||||
'compose': [],
|
'compose': [],
|
||||||
'contains': ['indexOf', 'some'],
|
'contains': ['indexOf', 'isString', 'some'],
|
||||||
'countBy': ['forEach'],
|
'countBy': ['forEach'],
|
||||||
'debounce': [],
|
'debounce': [],
|
||||||
'defaults': ['isArguments'],
|
'defaults': ['isArguments'],
|
||||||
@@ -118,10 +118,10 @@
|
|||||||
'lastIndexOf': [],
|
'lastIndexOf': [],
|
||||||
'lateBind': ['isFunction'],
|
'lateBind': ['isFunction'],
|
||||||
'map': ['forEach', 'isArray'],
|
'map': ['forEach', 'isArray'],
|
||||||
'max': ['forEach', 'isArray'],
|
'max': ['forEach', 'isArray', 'isString'],
|
||||||
'memoize': [],
|
'memoize': [],
|
||||||
'merge': ['forOwn', 'isArray', 'isPlainObject'],
|
'merge': ['forOwn', 'isArray', 'isPlainObject'],
|
||||||
'min': ['forEach', 'isArray'],
|
'min': ['forEach', 'isArray', 'isString'],
|
||||||
'mixin': ['forEach', 'functions'],
|
'mixin': ['forEach', 'functions'],
|
||||||
'noConflict': [],
|
'noConflict': [],
|
||||||
'object': [],
|
'object': [],
|
||||||
@@ -134,7 +134,7 @@
|
|||||||
'random': [],
|
'random': [],
|
||||||
'range': [],
|
'range': [],
|
||||||
'reduce': ['forEach'],
|
'reduce': ['forEach'],
|
||||||
'reduceRight': ['forEach', 'keys'],
|
'reduceRight': ['forEach', 'isString', 'keys'],
|
||||||
'reject': ['filter'],
|
'reject': ['filter'],
|
||||||
'rest': [],
|
'rest': [],
|
||||||
'result': ['isFunction'],
|
'result': ['isFunction'],
|
||||||
@@ -964,9 +964,15 @@
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
// update dependencies
|
// update dependencies
|
||||||
|
if (isMobile) {
|
||||||
|
dependencyMap.reduceRight = ['forEach', 'keys'];
|
||||||
|
}
|
||||||
if (isUnderscore) {
|
if (isUnderscore) {
|
||||||
|
dependencyMap.contains = ['indexOf', 'some'],
|
||||||
dependencyMap.isEqual = ['isArray', 'isFunction'];
|
dependencyMap.isEqual = ['isArray', 'isFunction'];
|
||||||
dependencyMap.isEmpty = ['isArray', 'isString'];
|
dependencyMap.isEmpty = ['isArray', 'isString'];
|
||||||
|
dependencyMap.max = ['forEach', 'isArray'];
|
||||||
|
dependencyMap.min = ['forEach', 'isArray'];
|
||||||
dependencyMap.pick = [];
|
dependencyMap.pick = [];
|
||||||
dependencyMap.template = ['defaults', 'escape'];
|
dependencyMap.template = ['defaults', 'escape'];
|
||||||
|
|
||||||
@@ -1221,6 +1227,9 @@
|
|||||||
// simplify DOM node check from `_.isEqual`
|
// simplify DOM node check from `_.isEqual`
|
||||||
source = source.replace(/(if *\(className *!= *objectClass).+?noNodeClass[\s\S]+?{/, '$1) {');
|
source = source.replace(/(if *\(className *!= *objectClass).+?noNodeClass[\s\S]+?{/, '$1) {');
|
||||||
|
|
||||||
|
// remove string collection callback definition from `_.max` and `_.min`
|
||||||
|
source = source.replace(/( +)if *\(!callback *&& *isString\(collection\)\)[\s\S]+?\n\1}\n/g, '');
|
||||||
|
|
||||||
// remove unused features from `createBound`
|
// remove unused features from `createBound`
|
||||||
if (buildMethods.indexOf('partial') == -1) {
|
if (buildMethods.indexOf('partial') == -1) {
|
||||||
source = source.replace(matchFunction(source, 'createBound'), function(match) {
|
source = source.replace(matchFunction(source, 'createBound'), function(match) {
|
||||||
|
|||||||
Reference in New Issue
Block a user