Comparing version 0.2.3 to 0.2.4
@@ -11,6 +11,8 @@ // Generated by CoffeeScript 1.8.0 | ||
getFullPath = function(path, basePath) { | ||
if ((typeof window !== "undefined" && window !== null) || !isRelative(path)) { | ||
if (typeof window !== "undefined" && window !== null) { | ||
return path; | ||
} else if (isRelative(path)) { | ||
return [basePath, path].join('/'); | ||
} else { | ||
return [basePath, path].join('/'); | ||
return [basePath, 'node_modules', path].join('/'); | ||
} | ||
@@ -51,7 +53,12 @@ }; | ||
Object.keys(modules).forEach(function(key) { | ||
var fullPath, module, moduleConfig, path, type; | ||
var e, fullPath, module, moduleConfig, path, type; | ||
moduleConfig = modules[key]; | ||
path = getPath(moduleConfig); | ||
fullPath = getFullPath(path, basePath); | ||
module = require(fullPath); | ||
try { | ||
module = require(fullPath); | ||
} catch (_error) { | ||
e = _error; | ||
module = require(path); | ||
} | ||
type = evaluateType(moduleConfig, module); | ||
@@ -58,0 +65,0 @@ if (type === 'factory') { |
{ | ||
"name": "amend", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"description": "Dependency injection module and IoC container.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19030
256
3