Comparing version 1.0.0 to 1.0.1
@@ -64,3 +64,2 @@ // Copyright (c) 2011 Daniel Ennis <aikar@aikar.co> | ||
}); | ||
//applyGetters(currentp.getters, currentobj[val]); | ||
return currentobj[val]; | ||
@@ -76,3 +75,2 @@ }); | ||
getp2.create = fn; | ||
//console.dir(getters); | ||
} | ||
@@ -106,10 +104,11 @@ | ||
} else { | ||
var extLoc = fullPath.lastIndexOf('.'); | ||
var extLoc = file.lastIndexOf('.'); | ||
if (extLoc != -1) { | ||
var ext = file.substr(extLoc); | ||
if (require.extensions[ext]) { | ||
autoload(obj, objpath.concat(file), fullPath, cb) | ||
autoload(obj, objpath.concat(path.basename(file,ext)), fullPath, cb) | ||
} | ||
} | ||
} | ||
} | ||
@@ -120,2 +119,3 @@ }); | ||
function autoload(obj, objpath, fullPath, cb) { | ||
//console.log("AUTOLOAD", objpath, fullPath) | ||
var load = function(obj, key) { | ||
@@ -127,3 +127,2 @@ var module = null; | ||
if (!module) { | ||
console.error("Requiring:", fullPath) | ||
module = require(fullPath); | ||
@@ -130,0 +129,0 @@ } |
{ | ||
"author": "Aikar <aikar@aikar.co> (http://aikar.co)", | ||
"name": "autoloader", | ||
"description": "Autoloads JS Classes with Traceur", | ||
"version": "1.0.0", | ||
"description": "Autoloads JS Files (designed for Joose)", | ||
"version": "1.0.1", | ||
"homepage": "http://aikar.co", | ||
@@ -7,0 +7,0 @@ "main": "autoloader.js", |
4641
122