Correct getVars filter in build.js

Former-commit-id: 4be03b389d54ec360e56918c4d4ca2ad26f46f8a
This commit is contained in:
John-David Dalton
2013-06-16 10:23:39 -07:00
parent 545cc1074c
commit ec4c6e140b

View File

@@ -235,9 +235,6 @@
/** List of all methods */ /** List of all methods */
var allMethods = _.keys(dependencyMap); var allMethods = _.keys(dependencyMap);
/** List of Lo-Dash methods */
var lodashMethods = _.without(allMethods, 'findWhere');
/** List of Backbone's Lo-Dash dependencies */ /** List of Backbone's Lo-Dash dependencies */
var backboneDependencies = [ var backboneDependencies = [
'bind', 'bind',
@@ -359,6 +356,9 @@
'unescapeHtmlChar' 'unescapeHtmlChar'
]; ];
/** List of Lo-Dash methods */
var lodashMethods = _.without.apply(_, [allMethods].concat(privateMethods));
/** List of Underscore methods */ /** List of Underscore methods */
var underscoreMethods = _.without.apply(_, [allMethods].concat(lodashOnlyMethods, privateMethods)); var underscoreMethods = _.without.apply(_, [allMethods].concat(lodashOnlyMethods, privateMethods));
@@ -1025,7 +1025,7 @@
result.push(varA || varB || varC); result.push(varA || varB || varC);
}); });
return _.without.apply(_, [_.uniq(result)].concat(allMethods)).sort(); return _.without.apply(_, [_.uniq(result)].concat(lodashMethods)).sort();
} }
/** /**
@@ -3100,8 +3100,7 @@
else { else {
// remove methods from the build // remove methods from the build
allMethods.forEach(function(otherName) { allMethods.forEach(function(otherName) {
if (!_.contains(buildMethods, otherName) && if (!_.contains(buildMethods, otherName)) {
!(otherName == 'findWhere' && !isUnderscore)) {
source = removeFunction(source, otherName); source = removeFunction(source, otherName);
} }
}); });