diff options
author | Jose Antonio Marquez | 2012-05-16 15:42:37 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-05-16 15:42:37 -0700 |
commit | 857aafee732b6a85fa155ff4a05d1b8fde48f09d (patch) | |
tree | e06d330caee280aa05aec46391979e9abdcf974c /node_modules/montage/require | |
parent | 5cc5d29736d8bf253e3a168cdd6443e839ffb23c (diff) | |
parent | fd54dabad7cbc27a0efb0957155c00d578912909 (diff) | |
download | ninja-857aafee732b6a85fa155ff4a05d1b8fde48f09d.tar.gz |
Merge branch 'refs/heads/Ninja-DOM-Architecture' into Document
Diffstat (limited to 'node_modules/montage/require')
-rwxr-xr-x | node_modules/montage/require/browser.js | 2 | ||||
-rwxr-xr-x | node_modules/montage/require/require.js | 20 |
2 files changed, 6 insertions, 16 deletions
diff --git a/node_modules/montage/require/browser.js b/node_modules/montage/require/browser.js index f4a11d97..a6a8af5a 100755 --- a/node_modules/montage/require/browser.js +++ b/node_modules/montage/require/browser.js | |||
@@ -82,7 +82,7 @@ if (global.navigator && global.navigator.userAgent.indexOf("Firefox") >= 0) { | |||
82 | } | 82 | } |
83 | 83 | ||
84 | var __FILE__String = "__FILE__", | 84 | var __FILE__String = "__FILE__", |
85 | DoubleUnderscoreString = "__" | 85 | DoubleUnderscoreString = "__", |
86 | globalEvalConstantA = "(function ", | 86 | globalEvalConstantA = "(function ", |
87 | globalEvalConstantB = "(require, exports, module) {", | 87 | globalEvalConstantB = "(require, exports, module) {", |
88 | globalEvalConstantC = "//*/\n})\n//@ sourceURL="; | 88 | globalEvalConstantC = "//*/\n})\n//@ sourceURL="; |
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); |