mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 00:27:50 +00:00
remove old curl, update to curl 0.8.1 kitchen sink dist and use curl legacy config for test instead of js! plugin
Former-commit-id: 9cba27cb9e0e7644a8a824b30fe5e85e85fc165e
This commit is contained in:
@@ -54,7 +54,7 @@
|
||||
return;
|
||||
}
|
||||
var reBasename = /[\w.-]+$/,
|
||||
basePath = ('//' + location.hostname + location.pathname).replace(/\btest\/$/, ''),
|
||||
basePath = ('//' + location.hostname + ':' + location.port + location.pathname).replace(/\btest\/$/, ''),
|
||||
isModularize = /modularize/.test(ui.urlParams.build),
|
||||
modulePath = ui.buildPath.replace(/\.js$/, ''),
|
||||
moduleMain = modulePath.match(reBasename)[0];
|
||||
@@ -63,12 +63,6 @@
|
||||
? '../modularize'
|
||||
: modulePath.replace(reBasename, '');
|
||||
|
||||
var pluginPath = window.curl
|
||||
? ui.loaderPath.replace(reBasename, 'curl/plugin/js!')
|
||||
: '';
|
||||
|
||||
var testPath = pluginPath + basePath + '/test/test.js';
|
||||
|
||||
QUnit.config.autostart = false;
|
||||
|
||||
// load Lo-Dash as a module
|
||||
@@ -88,6 +82,15 @@
|
||||
'name': 'lodash',
|
||||
'location': locationPath,
|
||||
'main': moduleMain
|
||||
},
|
||||
{
|
||||
'name': 'test',
|
||||
'location': basePath + '/test',
|
||||
'main': '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
|
||||
}
|
||||
}
|
||||
],
|
||||
'shim': {
|
||||
@@ -112,7 +115,7 @@
|
||||
if (isModularize) {
|
||||
window._ = lodash;
|
||||
}
|
||||
require([testPath], function() {
|
||||
require(['test'], function() {
|
||||
QUnit.start();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
ui.loaderPath = (function() {
|
||||
var result;
|
||||
switch (loader) {
|
||||
case 'curl': result = 'vendor/curl/src/curl.js'; break;
|
||||
case 'curl': result = 'vendor/curl/curl.js'; break;
|
||||
case 'dojo': result = 'vendor/dojo/dojo.js'; break;
|
||||
case 'requirejs':
|
||||
case undefined: result = 'vendor/requirejs/require.js'; break;
|
||||
|
||||
Reference in New Issue
Block a user