1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00

'-r' should work with $NODE_PATH as well (where previously it was an absolute/relative path)

This commit is contained in:
Stan Angeloff 2010-08-16 17:36:55 +03:00
parent 027b9e9dc3
commit 01cd5476a0
2 changed files with 2 additions and 2 deletions

View file

@ -102,7 +102,7 @@
_e = o.require;
for (_d = 0, _f = _e.length; _d < _f; _d++) {
file = _e[_d];
require(fs.realpathSync(file));
require(helpers.starts(file, '.') ? fs.realpathSync(file) : file);
}
}
try {

View file

@ -96,7 +96,7 @@ compileScript = (file, input, base) ->
o = opts
options = compileOptions file
if o.require
require fs.realpathSync file for file in o.require
require(if helpers.starts(file, '.') then fs.realpathSync(file) else file) for file in o.require
try
t = task = {file, input, options}
CoffeeScript.emit 'compile', task