Add legacy build to the perf suite and ensure belt is assigned the correct value.

Former-commit-id: 568bbd8157155d76d406ae0e33fe71418f4632f4
This commit is contained in:
John-David Dalton
2013-04-24 12:53:18 -07:00
parent de4b5eeda7
commit 17471a12d2
2 changed files with 6 additions and 4 deletions

View File

@@ -39,6 +39,7 @@
var result;
switch (build) {
case 'lodash-compat': result = 'dist/lodash.compat.min.js'; break;
case 'lodash-legacy': result = 'dist/lodash.legacy.min.js'; break;
case 'lodash-mobile': result = 'dist/lodash.mobile.min.js'; break;
case 'lodash-underscore': result = 'dist/lodash.underscore.min.js'; break;
case 'lodash-custom-dev': result = 'lodash.custom.js'; break;
@@ -55,6 +56,7 @@
var result;
switch (other) {
case 'lodash-compat': result = 'dist/lodash.compat.min.js'; break;
case 'lodash-legacy': result = 'dist/lodash.legacy.min.js'; break;
case 'lodash-mobile': result = 'dist/lodash.mobile.min.js'; break;
case 'lodash-modern': result = 'dist/lodash.min.js'; break;
case 'lodash-underscore': result = 'dist/lodash.underscore.min.js'; break;

View File

@@ -67,16 +67,16 @@
var toString = Object.prototype.toString;
/** The `ui` object */
var ui = window.ui || ({
var ui = window.ui || (window.ui = {
'buildPath': basename(filePath, '.js'),
'otherPath': 'underscore'
});
/** The Lo-Dash build basename */
var buildName = basename(ui.buildPath, '.js');
var buildName = window.buildName = basename(ui.buildPath, '.js');
/** The other library basename */
var otherName = basename(ui.otherPath, '.js');
var otherName = window.otherName = basename(ui.otherPath, '.js');
/** Detect if in a browser environment */
var isBrowser = isHostType(window, 'document') && isHostType(window, 'navigator');
@@ -256,7 +256,7 @@
'setup': '\
var _ = window._,\
lodash = window.lodash,\
belt = this.name == "Lo-Dash" ? lodash : _;\
belt = this.name == buildName ? lodash : _;\
\
var index,\
date = new Date,\