Hidden files no longer queued for --join (fixes #2263)

This commit is contained in:
Trevor Burnham 2012-04-23 13:59:42 -04:00
parent d58da49cee
commit 3b1a566117
2 changed files with 9 additions and 10 deletions

View File

@ -109,7 +109,7 @@
watchDir(source, base);
}
return fs.readdir(source, function(err, files) {
var file, index, _i, _len, _ref1, _ref2, _results;
var file, index, _ref1, _ref2;
if (err && err.code !== 'ENOENT') {
throw err;
}
@ -117,6 +117,9 @@
return;
}
index = sources.indexOf(source);
files = files.filter(function(file) {
return !hidden(file);
});
[].splice.apply(sources, [index, index - index + 1].concat(_ref1 = (function() {
var _i, _len, _results;
_results = [];
@ -129,14 +132,9 @@
[].splice.apply(sourceCode, [index, index - index + 1].concat(_ref2 = files.map(function() {
return null;
}))), _ref2;
_results = [];
for (_i = 0, _len = files.length; _i < _len; _i++) {
file = files[_i];
if (!hidden(file)) {
_results.push(compilePath(path.join(source, file), false, base));
}
}
return _results;
return files.forEach(function(file) {
return compilePath(path.join(source, file), false, base);
});
});
} else if (topLevel || path.extname(source) === '.coffee') {
if (opts.watch) {

View File

@ -98,9 +98,10 @@ compilePath = (source, topLevel, base) ->
throw err if err and err.code isnt 'ENOENT'
return if err?.code is 'ENOENT'
index = sources.indexOf source
files = files.filter (file) -> not hidden file
sources[index..index] = (path.join source, file for file in files)
sourceCode[index..index] = files.map -> null
for file in files when not hidden file
files.forEach (file) ->
compilePath (path.join source, file), no, base
else if topLevel or path.extname(source) is '.coffee'
watch source, base if opts.watch