mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 10:17:48 +00:00
Make custom build regexp less picky and fix typo in build.js.
Former-commit-id: 6be9d35758f5a3f82ff1a01d02d8a3f17e0d9a97
This commit is contained in:
6
build.js
6
build.js
@@ -366,7 +366,7 @@
|
|||||||
// custom build
|
// custom build
|
||||||
process.argv.some(function(arg) {
|
process.argv.some(function(arg) {
|
||||||
// exit early if not the "exclude" or "include" command option
|
// exit early if not the "exclude" or "include" command option
|
||||||
var pair = arg.match(/^(exclude|include)=(.+)$/);
|
var pair = arg.match(/^(exclude|include)=(.*)$/);
|
||||||
if (!pair) {
|
if (!pair) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -400,11 +400,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// remove associated functions, variables and code snippets
|
// remove associated functions, variables and code snippets
|
||||||
if (isRemoved('isArguments')) {
|
if (isRemoved(source, 'isArguments')) {
|
||||||
// remove `isArguments` if-statement
|
// remove `isArguments` if-statement
|
||||||
source = source.replace(/(?:\s*\/\/.*)*\s*if *\(!isArguments[^)]+\)[\s\S]+?};?\s*}\n/, '');
|
source = source.replace(/(?:\s*\/\/.*)*\s*if *\(!isArguments[^)]+\)[\s\S]+?};?\s*}\n/, '');
|
||||||
}
|
}
|
||||||
if (isRemoved('mixin')) {
|
if (isRemoved(source, 'mixin')) {
|
||||||
// remove `LoDash` constructor
|
// remove `LoDash` constructor
|
||||||
source = removeFunction(source, 'LoDash');
|
source = removeFunction(source, 'LoDash');
|
||||||
// remove `LoDash` calls
|
// remove `LoDash` calls
|
||||||
|
|||||||
Reference in New Issue
Block a user