From 27ca48c6bb554262d191fcb6ce5f1125ba602189 Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Sun, 14 Jul 2013 13:51:01 -0700 Subject: [PATCH] use packages instead of path for modularize option Former-commit-id: 9f8d3cc49fe3f8d21991e48b46845abd9101f171 --- test/index.html | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/test/index.html b/test/index.html index 6372bb415..fd5b5577b 100644 --- a/test/index.html +++ b/test/index.html @@ -71,15 +71,28 @@ QUnit.config.autostart = false; + var paths = { + 'shimmed': './abc/../' + modulePath, + 'underscore': './xyz/../' + modulePath + }; + + var packages = []; + + if (isModularize) { + packages.push({ + 'name': 'lodash', + 'location': '.', + 'main': 'lodash' + }); + } else { + paths.lodash = modulePath; + } + // load Lo-Dash as a module require({ 'baseUrl': baseUrl, 'urlArgs': 't=' + (+new Date), - 'paths': { - 'lodash': modulePath, - 'shimmed': './abc/../' + modulePath, - 'underscore': './xyz/../' + modulePath - }, + 'paths': paths, 'aliases': [ ['shimmed', 'lodash'], ['underscore', 'lodash'] @@ -88,7 +101,8 @@ 'shimmed': { 'exports': '_' } - } + }, + 'packages': packages }, ['lodash', 'shimmed', 'underscore'], function(lodash, shimmed, underscore) { if (shimmed && shimmed.noConflict) {