Comparing version 0.0.17 to 0.0.18
@@ -26,3 +26,3 @@ 'use strict'; | ||
ModuleMapper.prototype.resolve = function (name) { | ||
_.each(this.$paths || {}, function (path) { | ||
_.eachRight(this.$paths || {}, function (path) { | ||
var match; | ||
@@ -34,3 +34,2 @@ if (!(match = name.match(path.from))) { | ||
name = name.replace(path.from, path.to + match[1]); | ||
return false; | ||
}); | ||
@@ -37,0 +36,0 @@ |
{ | ||
"name": "r42", | ||
"version": "0.0.17", | ||
"version": "0.0.18", | ||
"description": "Dependency injection done right.", | ||
@@ -5,0 +5,0 @@ "author": "Quentin Raynaud <npm@qraynaud.eu>", |
@@ -21,3 +21,3 @@ ## r42 | ||
Let's code lib/toto.js : | ||
Let's code `lib/toto.js` : | ||
@@ -57,3 +57,9 @@ ```js | ||
// 'sub/.../truc' will be looked for into the ../sub folder | ||
sub: '../sub' | ||
sub: '../sub', | ||
// Alias can also be used in configuration but they HAVE TO be declared | ||
// BEFORE being used in the object | ||
shMod: 'sh/module', // refers to 'shortcut/module' | ||
sh: 'shortcut', | ||
shMod2: 'sh/module2', // refers to 'shortcut/module2' | ||
}, | ||
@@ -60,0 +66,0 @@ }); |
13758
197
276