Expose lodash in the amd fork of the UMD in case it's being loaded with a shim config. [closes #400]

This commit is contained in:
John-David Dalton
2013-11-19 09:24:12 -08:00
parent a904e54122
commit d95e577639
9 changed files with 29 additions and 16 deletions

View File

@@ -85,13 +85,9 @@
// clear existing `_` value
window._ = undefined;
// load the non-modularized build of Lo-Dash
if (!ui.isModularize) {
document.write('<script src="' + ui.buildPath + '"><\/script>');
}
// load test.js if not using require.js
// load Lo-Dash and test scripts
document.write(ui.urlParams.loader == 'none'
? '<script src="test.js"><\/script>'
? '<script src="' + ui.buildPath + '"><\/script><script src="test.js"><\/script>'
: '<script data-dojo-config="async:1" src="' + ui.loaderPath + '"><\/script>'
);
</script>
@@ -161,8 +157,8 @@
underscoreModule = underscore.noConflict();
underscoreModule.moduleName = 'underscore';
}
if (lodash && lodash.noConflict) {
lodashModule = lodash.noConflict();
if (lodash) {
lodashModule = lodash;
lodashModule.moduleName = 'lodash';
}
if (ui.isModularize) {

View File

@@ -110,14 +110,11 @@
global_test_results = results;
});
// load the non-modularized build of Lo-Dash
if (!ui.isModularize) {
document.write('<script src="' + ui.buildPath + '"><\/script>');
}
// load test.js if not using require.js
// load Lo-Dash and test scripts
document.write(ui.urlParams.loader != 'none'
? '<script data-dojo-config="async:1" src="' + ui.loaderPath + '"><\/script>'
: ([
'<script src="' + ui.buildPath + '"><\/script>',
'<script src="../vendor/underscore/test/collections.js"><\/script>',
'<script src="../vendor/underscore/test/arrays.js"><\/script>',
'<script src="../vendor/underscore/test/functions.js"><\/script>',