From 9c0f4822bc0aa79679c80e56add340972b7cbad0 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 16 Jun 2013 00:05:21 -0700 Subject: [PATCH] Make build allow `iife` with newlines and remove `isNode` from builds that don't need it. Former-commit-id: 2c0f123d80ea63fb6072d1c02762edd56892d056 --- build.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/build.js b/build.js index 98dd7cf0f..e735f5de5 100755 --- a/build.js +++ b/build.js @@ -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))) {