Make build allow iife with newlines and remove isNode from builds that don't need it.

Former-commit-id: 2c0f123d80ea63fb6072d1c02762edd56892d056
This commit is contained in:
John-David Dalton
2013-06-16 00:05:21 -07:00
parent 5040ec109b
commit 9c0f4822bc

View File

@@ -1789,7 +1789,7 @@
// used to report invalid command-line arguments
var invalidArgs = _.reject(options.slice(reNode.test(options[0]) ? 2 : 0), function(value, index, options) {
if (/^(?:-o|--output)$/.test(options[index - 1]) ||
/^(?:category|exclude|exports|iife|include|moduleId|minus|plus|settings|template)=.*$/.test(value)) {
/^(?:category|exclude|exports|iife|include|moduleId|minus|plus|settings|template)=[\s\S]*$/.test(value)) {
return true;
}
var result = _.contains([
@@ -1853,7 +1853,7 @@
// used to specify a custom IIFE to wrap Lo-Dash
var iife = options.reduce(function(result, value) {
var match = value.match(/^iife=(.*)$/);
var match = value.match(/^iife=([\s\S]*)$/);
return match ? match[1] : result;
}, null);
@@ -2110,6 +2110,12 @@
}
});
_.each(['clone', 'isEqual', 'shimIsPlainObject'], function(methodName) {
if (!(isUnderscore && useLodashMethod(methodName))) {
dependencyMap[methodName] = _.without(dependencyMap[methodName], 'isNode');
}
});
if (!isMobile) {
_.each(['every', 'find', 'filter', 'forEach', 'forIn', 'forOwn', 'map', 'reduce'], function(methodName) {
if (!(isUnderscore && useLodashMethod(methodName))) {