mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 23:37:49 +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
|
||||
process.argv.some(function(arg) {
|
||||
// exit early if not the "exclude" or "include" command option
|
||||
var pair = arg.match(/^(exclude|include)=(.+)$/);
|
||||
var pair = arg.match(/^(exclude|include)=(.*)$/);
|
||||
if (!pair) {
|
||||
return false;
|
||||
}
|
||||
@@ -400,11 +400,11 @@
|
||||
}
|
||||
|
||||
// remove associated functions, variables and code snippets
|
||||
if (isRemoved('isArguments')) {
|
||||
if (isRemoved(source, 'isArguments')) {
|
||||
// remove `isArguments` if-statement
|
||||
source = source.replace(/(?:\s*\/\/.*)*\s*if *\(!isArguments[^)]+\)[\s\S]+?};?\s*}\n/, '');
|
||||
}
|
||||
if (isRemoved('mixin')) {
|
||||
if (isRemoved(source, 'mixin')) {
|
||||
// remove `LoDash` constructor
|
||||
source = removeFunction(source, 'LoDash');
|
||||
// remove `LoDash` calls
|
||||
|
||||
Reference in New Issue
Block a user