mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-11 11:27:50 +00:00
Fix build.
Former-commit-id: 41b9584b63962a71f146c61fda056d15a2be4e14
This commit is contained in:
17
build.js
17
build.js
@@ -131,7 +131,7 @@
|
|||||||
'memoize': [],
|
'memoize': [],
|
||||||
'merge': ['forEach', 'forOwn', 'isArray', 'isObject', 'isPlainObject'],
|
'merge': ['forEach', 'forOwn', 'isArray', 'isObject', 'isPlainObject'],
|
||||||
'min': ['isArray', 'isEqual', 'isString', 'keys'],
|
'min': ['isArray', 'isEqual', 'isString', 'keys'],
|
||||||
'mixin': ['forEach', 'forOwn', 'functions'],
|
'mixin': ['forEach', 'functions'],
|
||||||
'noConflict': [],
|
'noConflict': [],
|
||||||
'object': [],
|
'object': [],
|
||||||
'omit': ['forIn', 'indexOf'],
|
'omit': ['forIn', 'indexOf'],
|
||||||
@@ -163,7 +163,7 @@
|
|||||||
'union': ['uniq'],
|
'union': ['uniq'],
|
||||||
'uniq': ['indexOf', 'isEqual', 'keys'],
|
'uniq': ['indexOf', 'isEqual', 'keys'],
|
||||||
'uniqueId': [],
|
'uniqueId': [],
|
||||||
'value': [],
|
'value': ['forOwn'],
|
||||||
'values': ['keys'],
|
'values': ['keys'],
|
||||||
'where': ['filter'],
|
'where': ['filter'],
|
||||||
'without': ['indexOf'],
|
'without': ['indexOf'],
|
||||||
@@ -983,9 +983,12 @@
|
|||||||
// grab the method assignments snippet
|
// grab the method assignments snippet
|
||||||
snippet = getMethodAssignments(source);
|
snippet = getMethodAssignments(source);
|
||||||
|
|
||||||
|
// remove method assignment from `lodash.prototype`
|
||||||
|
source = source.replace(RegExp('^ *lodash\\.prototype\\.' + funcName + ' *=.+\\n', 'm'), '');
|
||||||
|
|
||||||
// remove assignment and aliases
|
// remove assignment and aliases
|
||||||
var modified = getAliases(funcName).concat(funcName).reduce(function(result, otherName) {
|
var modified = getAliases(funcName).concat(funcName).reduce(function(result, otherName) {
|
||||||
return result.replace(RegExp('^(?: *//.*\\s*)* *lodash\\.' + otherName + ' *= *.+\\n', 'm'), '');
|
return result.replace(RegExp('^(?: *//.*\\s*)* *lodash\\.' + otherName + ' *=.+\\n', 'm'), '');
|
||||||
}, snippet);
|
}, snippet);
|
||||||
|
|
||||||
// replace with the modified snippet
|
// replace with the modified snippet
|
||||||
@@ -2265,16 +2268,16 @@
|
|||||||
modified = snippet;
|
modified = snippet;
|
||||||
|
|
||||||
if (!exposeAssign) {
|
if (!exposeAssign) {
|
||||||
modified = modified.replace(/^(?: *\/\/.*\s*)* *lodash\.assign *= *.+\n/m, '');
|
modified = modified.replace(/^(?: *\/\/.*\s*)* *lodash\.assign *=.+\n/m, '');
|
||||||
}
|
}
|
||||||
if (!exposeForIn) {
|
if (!exposeForIn) {
|
||||||
modified = modified.replace(/^(?: *\/\/.*\s*)* *lodash\.forIn *= *.+\n/m, '');
|
modified = modified.replace(/^(?: *\/\/.*\s*)* *lodash\.forIn *=.+\n/m, '');
|
||||||
}
|
}
|
||||||
if (!exposeForOwn) {
|
if (!exposeForOwn) {
|
||||||
modified = modified.replace(/^(?: *\/\/.*\s*)* *lodash\.forOwn *= *.+\n/m, '');
|
modified = modified.replace(/^(?: *\/\/.*\s*)* *lodash\.forOwn *=.+\n/m, '');
|
||||||
}
|
}
|
||||||
if (!exposeIsPlainObject) {
|
if (!exposeIsPlainObject) {
|
||||||
modified = modified.replace(/^(?: *\/\/.*\s*)* *lodash\.isPlainObject *= *.+\n/m, '');
|
modified = modified.replace(/^(?: *\/\/.*\s*)* *lodash\.isPlainObject *=.+\n/m, '');
|
||||||
}
|
}
|
||||||
source = source.replace(snippet, function() {
|
source = source.replace(snippet, function() {
|
||||||
return modified;
|
return modified;
|
||||||
|
|||||||
@@ -1101,7 +1101,7 @@
|
|||||||
if (index) {
|
if (index) {
|
||||||
equal(typeof lodash.prototype.x, 'function', basename);
|
equal(typeof lodash.prototype.x, 'function', basename);
|
||||||
} else {
|
} else {
|
||||||
equal('x' in lodash.prototype.x, false, basename);
|
equal('x' in lodash.prototype, false, basename);
|
||||||
}
|
}
|
||||||
start();
|
start();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user