Make custom build regexp less picky and fix typo in build.js.

Former-commit-id: 6be9d35758f5a3f82ff1a01d02d8a3f17e0d9a97
This commit is contained in:
John-David Dalton
2012-05-20 20:37:13 -04:00
parent 9a81df6d77
commit b03c2b3b8f

View File

@@ -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