From 69cbb6e1097abf0503ee9594fd627257e7340b07 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 30 Jun 2013 21:39:50 -0700 Subject: [PATCH] Add `templateSettings` to the `Chaining` category and cleanup `_.difference` use. Former-commit-id: acccb5d3868cf6e38b9f6f87b6107cf4c7b1ec30 --- build.js | 12 ++++++------ test/test-build.js | 3 ++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/build.js b/build.js index 07768a9d8..685662baa 100755 --- a/build.js +++ b/build.js @@ -251,7 +251,7 @@ 'template': ['reInterpolate'], }; - /** Used to track the category of functions */ + /** Used to track the category of identifiers */ var categoryMap = { 'Arrays': [ 'compact', @@ -367,6 +367,7 @@ 'result', 'runInContext', 'template', + 'templateSettings', 'times', 'unescape', 'uniqueId' @@ -450,7 +451,6 @@ 'nonEnumProps', 'shadowedProps', 'support', - 'templateSettings', 'whitespace' ]; @@ -523,10 +523,10 @@ var allFuncs = _.keys(funcDependencyMap); /** List of Lo-Dash functions */ - var lodashFuncs = _.difference(allFuncs, privateFuncs.concat('findWhere')); + var lodashFuncs = _.difference(allFuncs, privateFuncs, 'findWhere'); /** List of Underscore functions */ - var underscoreFuncs = _.difference(allFuncs, lodashOnlyFuncs.concat(privateFuncs)); + var underscoreFuncs = _.difference(allFuncs, lodashOnlyFuncs, privateFuncs); /** List of all property dependencies */ var propDependencies = _.uniq(_.transform(propDependencyMap, function(result, propNames) { @@ -2374,7 +2374,7 @@ }, 'exports': { 'entries': exportsOptions, - 'validEntries': ['amd', 'commonjs', 'global', 'node', 'none'] + 'validEntries': allExports }, 'include': { 'entries': includeFuncs, @@ -2389,7 +2389,7 @@ 'validEntries': allFuncs } }, function(data, commandName) { - invalidArgs = _.difference(data.entries, data.validEntries.concat('none')); + invalidArgs = _.difference(data.entries, data.validEntries, 'none'); if (invalidArgs.length) { warnings.push('Invalid `' + commandName + '` entr' + (invalidArgs.length > 1 ? 'ies' : 'y') + ' passed: ' + invalidArgs.join(', ')); } diff --git a/test/test-build.js b/test/test-build.js index 4769f1057..40f18aa64 100644 --- a/test/test-build.js +++ b/test/test-build.js @@ -89,7 +89,7 @@ 'zipObject': ['object'] }; - /** Used to track the category of functions */ + /** Used to track the category of identifiers */ var categoryMap = { 'Arrays': [ 'compact', @@ -205,6 +205,7 @@ 'result', 'runInContext', 'template', + 'templateSettings', 'times', 'unescape', 'uniqueId'