mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-14 04:37:50 +00:00
Fix build.
Former-commit-id: 9d57351081959276735f8f3df81ecde71c4b9344
This commit is contained in:
11
build.js
11
build.js
@@ -138,7 +138,6 @@
|
|||||||
'min': ['isArray', 'isEqual', 'isString', 'keys'],
|
'min': ['isArray', 'isEqual', 'isString', 'keys'],
|
||||||
'mixin': ['forEach', 'functions'],
|
'mixin': ['forEach', 'functions'],
|
||||||
'noConflict': [],
|
'noConflict': [],
|
||||||
'object': [],
|
|
||||||
'omit': ['forIn', 'indexOf'],
|
'omit': ['forIn', 'indexOf'],
|
||||||
'once': [],
|
'once': [],
|
||||||
'pairs': ['keys'],
|
'pairs': ['keys'],
|
||||||
@@ -175,6 +174,7 @@
|
|||||||
'without': ['indexOf'],
|
'without': ['indexOf'],
|
||||||
'wrap': [],
|
'wrap': [],
|
||||||
'zip': ['max', 'pluck'],
|
'zip': ['max', 'pluck'],
|
||||||
|
'zipObject': [],
|
||||||
|
|
||||||
// method used by the `backbone` and `underscore` builds
|
// method used by the `backbone` and `underscore` builds
|
||||||
'chain': ['value'],
|
'chain': ['value'],
|
||||||
@@ -2262,7 +2262,7 @@
|
|||||||
if (isLegacy) {
|
if (isLegacy) {
|
||||||
source = removeSetImmediate(source);
|
source = removeSetImmediate(source);
|
||||||
|
|
||||||
_.each(['isBindFast', 'isIeOpera', 'isV8', 'nativeBind', 'nativeIsArray', 'nativeKeys', 'reNative'], function(varName) {
|
_.each(['isBindFast', 'isIeOpera', 'isV8', 'nativeBind', 'nativeIsArray', 'nativeCreate', 'nativeKeys', 'reNative'], function(varName) {
|
||||||
source = removeVar(source, varName);
|
source = removeVar(source, varName);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -2271,6 +2271,11 @@
|
|||||||
return match.replace(/(?:\s*\/\/.*)*\s*return isBindFast[^:]+:\s*/, 'return ');
|
return match.replace(/(?:\s*\/\/.*)*\s*return isBindFast[^:]+:\s*/, 'return ');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// remove native `Object.create` branch in `createObject`
|
||||||
|
source = source.replace(matchFunction(source, 'createObject'), function(match) {
|
||||||
|
return match.replace(/nativeCreate * \|\|\s*/, '');
|
||||||
|
});
|
||||||
|
|
||||||
// remove native `Array.isArray` branch in `_.isArray`
|
// remove native `Array.isArray` branch in `_.isArray`
|
||||||
source = source.replace(matchFunction(source, 'isArray'), function(match) {
|
source = source.replace(matchFunction(source, 'isArray'), function(match) {
|
||||||
return match.replace(/nativeIsArray * \|\|\s*/, '');
|
return match.replace(/nativeIsArray * \|\|\s*/, '');
|
||||||
@@ -2523,7 +2528,7 @@
|
|||||||
source = source
|
source = source
|
||||||
.replace(/(?:\s*\/\/.*)*\n( *)forOwn\(lodash, *function\(func, *methodName\)[\s\S]+?\n\1}.+/g, '')
|
.replace(/(?:\s*\/\/.*)*\n( *)forOwn\(lodash, *function\(func, *methodName\)[\s\S]+?\n\1}.+/g, '')
|
||||||
.replace(/(?:\s*\/\/.*)*\n( *)each\(\['[\s\S]+?\n\1}.+/g, '')
|
.replace(/(?:\s*\/\/.*)*\n( *)each\(\['[\s\S]+?\n\1}.+/g, '')
|
||||||
.replace(/(?:\s*\/\/.*)*\s*lodash\.prototype.+/g, '');
|
.replace(/(?:\s*\/\/.*)*\n *lodash\.prototype.+/g, '');
|
||||||
}
|
}
|
||||||
// remove functions, variables, and snippets that the minifier may miss
|
// remove functions, variables, and snippets that the minifier may miss
|
||||||
if (isRemoved(source, 'clone')) {
|
if (isRemoved(source, 'clone')) {
|
||||||
|
|||||||
Reference in New Issue
Block a user