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:
Blaine Bublitz
2013-08-28 19:06:29 -07:00
parent 618b25df08
commit 316b8a1375
5 changed files with 60 additions and 1553 deletions

View File

@@ -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();
});
});

View File

@@ -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;