mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 00:27:50 +00:00
curl legacy loader
Former-commit-id: 08c7c76abe03823e3cdb0e25f76c969fa073226e
This commit is contained in:
committed by
John-David Dalton
parent
a5d2019a39
commit
dd84bca638
@@ -89,7 +89,7 @@
|
||||
return;
|
||||
}
|
||||
var reBasename = /[\w.-]+$/,
|
||||
basePath = ('//' + location.hostname + location.pathname).replace(/\btest\/$/, ''),
|
||||
basePath = ('//' + location.hostname + ':' + location.port + location.pathname).replace(/\btest\/$/, ''),
|
||||
modulePath = ui.buildPath.replace(/\.js$/, ''),
|
||||
moduleMain = modulePath.match(reBasename)[0];
|
||||
|
||||
@@ -97,10 +97,6 @@
|
||||
? '../modularize'
|
||||
: modulePath.replace(reBasename, '');
|
||||
|
||||
var pluginPath = window.curl
|
||||
? ui.loaderPath.replace(reBasename, 'curl/plugin/js!')
|
||||
: '';
|
||||
|
||||
QUnit.config.autostart = false;
|
||||
|
||||
// load Lo-Dash as a module
|
||||
@@ -112,18 +108,26 @@
|
||||
'name': 'lodash',
|
||||
'location': locationPath,
|
||||
'main': moduleMain
|
||||
},
|
||||
{
|
||||
'name': 'test',
|
||||
'location': '../vendor/underscore/test',
|
||||
'config': {
|
||||
'loader': 'curl/loader/legacy',
|
||||
'exports': 'QUnit' // cheat to work around no global being exported, won't be able to detect 404s in IE
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
['lodash'], function(lodash) {
|
||||
init(lodash);
|
||||
require([
|
||||
pluginPath + basePath + '/vendor/underscore/test/collections.js',
|
||||
pluginPath + basePath + '/vendor/underscore/test/arrays.js',
|
||||
pluginPath + basePath + '/vendor/underscore/test/functions.js',
|
||||
pluginPath + basePath + '/vendor/underscore/test/objects.js',
|
||||
pluginPath + basePath + '/vendor/underscore/test/utility.js',
|
||||
pluginPath + basePath + '/vendor/underscore/test/chaining.js'
|
||||
'test/collections',
|
||||
'test/arrays',
|
||||
'test/functions',
|
||||
'test/objects',
|
||||
'test/utility',
|
||||
'test/chaining'
|
||||
], function() {
|
||||
QUnit.start();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user