From aa54cdbbed739e988d5a7902578913d80debf709 Mon Sep 17 00:00:00 2001 From: Andrew Schaaf Date: Mon, 24 Jan 2011 10:25:53 -0500 Subject: [PATCH] support absolute paths --- bin/expresso | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/expresso b/bin/expresso index 5807f5a..904c8cf 100755 --- a/bin/expresso +++ b/bin/expresso @@ -686,9 +686,11 @@ function runFiles(files) { function runFile(file, fn) { if (file.match(/\.js$/)) { - var title = path.basename(file), - file = path.join(cwd, file), - mod = require(file.replace(/\.js$/, '')); + var title = path.basename(file); + if (!file.match(/^\//)) { + file = path.join(cwd, file); + } + var mod = require(file.replace(/\.js$/, '')); (function check(){ var len = Object.keys(mod).length; if (len) {