mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 18:37:50 +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
|
// used to report invalid command-line arguments
|
||||||
var invalidArgs = _.reject(options.slice(reNode.test(options[0]) ? 2 : 0), function(value, index, options) {
|
var invalidArgs = _.reject(options.slice(reNode.test(options[0]) ? 2 : 0), function(value, index, options) {
|
||||||
if (/^(?:-o|--output)$/.test(options[index - 1]) ||
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
var result = _.contains([
|
var result = _.contains([
|
||||||
@@ -1853,7 +1853,7 @@
|
|||||||
|
|
||||||
// used to specify a custom IIFE to wrap Lo-Dash
|
// used to specify a custom IIFE to wrap Lo-Dash
|
||||||
var iife = options.reduce(function(result, value) {
|
var iife = options.reduce(function(result, value) {
|
||||||
var match = value.match(/^iife=(.*)$/);
|
var match = value.match(/^iife=([\s\S]*)$/);
|
||||||
return match ? match[1] : result;
|
return match ? match[1] : result;
|
||||||
}, null);
|
}, null);
|
||||||
|
|
||||||
@@ -2110,6 +2110,12 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
_.each(['clone', 'isEqual', 'shimIsPlainObject'], function(methodName) {
|
||||||
|
if (!(isUnderscore && useLodashMethod(methodName))) {
|
||||||
|
dependencyMap[methodName] = _.without(dependencyMap[methodName], 'isNode');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
if (!isMobile) {
|
if (!isMobile) {
|
||||||
_.each(['every', 'find', 'filter', 'forEach', 'forIn', 'forOwn', 'map', 'reduce'], function(methodName) {
|
_.each(['every', 'find', 'filter', 'forEach', 'forIn', 'forOwn', 'map', 'reduce'], function(methodName) {
|
||||||
if (!(isUnderscore && useLodashMethod(methodName))) {
|
if (!(isUnderscore && useLodashMethod(methodName))) {
|
||||||
|
|||||||
Reference in New Issue
Block a user