diff options
author | Valerio Virgillito | 2012-05-16 15:23:48 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-05-16 15:23:48 -0700 |
commit | 13ae16997d4bbca14e255d5989d1c44a76eac72c (patch) | |
tree | d9ebb1dcc6bebee4cb910b950ecb67c1a2d593cd /node_modules/montage/require/require.js | |
parent | 99f16ae08fbb0a6dfe6008c9833f2253b18c19e5 (diff) | |
download | ninja-13ae16997d4bbca14e255d5989d1c44a76eac72c.tar.gz |
montage v.0.10 integration
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'node_modules/montage/require/require.js')
-rwxr-xr-x | node_modules/montage/require/require.js | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/node_modules/montage/require/require.js b/node_modules/montage/require/require.js index 4ea8a46d..eaa2d9fc 100755 --- a/node_modules/montage/require/require.js +++ b/node_modules/montage/require/require.js | |||
@@ -372,17 +372,9 @@ | |||
372 | function normalizeDependency(dependency, config, name) { | 372 | function normalizeDependency(dependency, config, name) { |
373 | config = config || {}; | 373 | config = config || {}; |
374 | if (typeof dependency === "string") { | 374 | if (typeof dependency === "string") { |
375 | if (dependency.indexOf("@") >= 0) { | 375 | dependency = { |
376 | var parts = dependency.split("@"); | 376 | location: dependency |
377 | dependency = { | 377 | }; |
378 | name: parts[0] || name, | ||
379 | version: parts[1] | ||
380 | }; | ||
381 | } else { | ||
382 | dependency = { | ||
383 | location: dependency | ||
384 | }; | ||
385 | } | ||
386 | } | 378 | } |
387 | // if the named dependency has already been found at another | 379 | // if the named dependency has already been found at another |
388 | // location, refer to the same eventual instance | 380 | // location, refer to the same eventual instance |
@@ -457,7 +449,7 @@ | |||
457 | var overlay = description.overlay || {}; | 449 | var overlay = description.overlay || {}; |
458 | Require.overlays.forEach(function (engine) { | 450 | Require.overlays.forEach(function (engine) { |
459 | if (overlay[engine]) { | 451 | if (overlay[engine]) { |
460 | layer = overlay[engine]; | 452 | var layer = overlay[engine]; |
461 | for (var name in layer) { | 453 | for (var name in layer) { |
462 | description[name] = layer[name]; | 454 | description[name] = layer[name]; |
463 | } | 455 | } |
@@ -468,9 +460,7 @@ | |||
468 | // directories | 460 | // directories |
469 | description.directories = description.directories || {}; | 461 | description.directories = description.directories || {}; |
470 | description.directories.lib = | 462 | description.directories.lib = |
471 | description.directories.lib === void 0 | 463 | description.directories.lib === void 0 ? "." : description.directories.lib; |
472 | ? "." | ||
473 | : description.directories.lib; | ||
474 | var lib = description.directories.lib; | 464 | var lib = description.directories.lib; |
475 | // lib | 465 | // lib |
476 | config.lib = URL.resolve(location, "./" + lib); | 466 | config.lib = URL.resolve(location, "./" + lib); |