mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-12 11:57:49 +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;
|
return;
|
||||||
}
|
}
|
||||||
var reBasename = /[\w.-]+$/,
|
var reBasename = /[\w.-]+$/,
|
||||||
basePath = ('//' + location.hostname + location.pathname).replace(/\btest\/$/, ''),
|
basePath = ('//' + location.hostname + ':' + location.port + location.pathname).replace(/\btest\/$/, ''),
|
||||||
modulePath = ui.buildPath.replace(/\.js$/, ''),
|
modulePath = ui.buildPath.replace(/\.js$/, ''),
|
||||||
moduleMain = modulePath.match(reBasename)[0];
|
moduleMain = modulePath.match(reBasename)[0];
|
||||||
|
|
||||||
@@ -97,10 +97,6 @@
|
|||||||
? '../modularize'
|
? '../modularize'
|
||||||
: modulePath.replace(reBasename, '');
|
: modulePath.replace(reBasename, '');
|
||||||
|
|
||||||
var pluginPath = window.curl
|
|
||||||
? ui.loaderPath.replace(reBasename, 'curl/plugin/js!')
|
|
||||||
: '';
|
|
||||||
|
|
||||||
QUnit.config.autostart = false;
|
QUnit.config.autostart = false;
|
||||||
|
|
||||||
// load Lo-Dash as a module
|
// load Lo-Dash as a module
|
||||||
@@ -112,18 +108,26 @@
|
|||||||
'name': 'lodash',
|
'name': 'lodash',
|
||||||
'location': locationPath,
|
'location': locationPath,
|
||||||
'main': moduleMain
|
'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) {
|
['lodash'], function(lodash) {
|
||||||
init(lodash);
|
init(lodash);
|
||||||
require([
|
require([
|
||||||
pluginPath + basePath + '/vendor/underscore/test/collections.js',
|
'test/collections',
|
||||||
pluginPath + basePath + '/vendor/underscore/test/arrays.js',
|
'test/arrays',
|
||||||
pluginPath + basePath + '/vendor/underscore/test/functions.js',
|
'test/functions',
|
||||||
pluginPath + basePath + '/vendor/underscore/test/objects.js',
|
'test/objects',
|
||||||
pluginPath + basePath + '/vendor/underscore/test/utility.js',
|
'test/utility',
|
||||||
pluginPath + basePath + '/vendor/underscore/test/chaining.js'
|
'test/chaining'
|
||||||
], function() {
|
], function() {
|
||||||
QUnit.start();
|
QUnit.start();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user