mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 07:47:49 +00:00
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:
10
build.js
10
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))) {
|
||||
|
||||
Reference in New Issue
Block a user