mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Add legacy build to the perf suite and ensure belt is assigned the correct value.
Former-commit-id: 568bbd8157155d76d406ae0e33fe71418f4632f4
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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,\
|
||||
|
||||
Reference in New Issue
Block a user