mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
Hidden files no longer queued for --join (fixes #2263)
This commit is contained in:
parent
d58da49cee
commit
3b1a566117
2 changed files with 9 additions and 10 deletions
|
@ -109,7 +109,7 @@
|
||||||
watchDir(source, base);
|
watchDir(source, base);
|
||||||
}
|
}
|
||||||
return fs.readdir(source, function(err, files) {
|
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') {
|
if (err && err.code !== 'ENOENT') {
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
|
@ -117,6 +117,9 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
index = sources.indexOf(source);
|
index = sources.indexOf(source);
|
||||||
|
files = files.filter(function(file) {
|
||||||
|
return !hidden(file);
|
||||||
|
});
|
||||||
[].splice.apply(sources, [index, index - index + 1].concat(_ref1 = (function() {
|
[].splice.apply(sources, [index, index - index + 1].concat(_ref1 = (function() {
|
||||||
var _i, _len, _results;
|
var _i, _len, _results;
|
||||||
_results = [];
|
_results = [];
|
||||||
|
@ -129,14 +132,9 @@
|
||||||
[].splice.apply(sourceCode, [index, index - index + 1].concat(_ref2 = files.map(function() {
|
[].splice.apply(sourceCode, [index, index - index + 1].concat(_ref2 = files.map(function() {
|
||||||
return null;
|
return null;
|
||||||
}))), _ref2;
|
}))), _ref2;
|
||||||
_results = [];
|
return files.forEach(function(file) {
|
||||||
for (_i = 0, _len = files.length; _i < _len; _i++) {
|
return compilePath(path.join(source, file), false, base);
|
||||||
file = files[_i];
|
});
|
||||||
if (!hidden(file)) {
|
|
||||||
_results.push(compilePath(path.join(source, file), false, base));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return _results;
|
|
||||||
});
|
});
|
||||||
} else if (topLevel || path.extname(source) === '.coffee') {
|
} else if (topLevel || path.extname(source) === '.coffee') {
|
||||||
if (opts.watch) {
|
if (opts.watch) {
|
||||||
|
|
|
@ -98,9 +98,10 @@ compilePath = (source, topLevel, base) ->
|
||||||
throw err if err and err.code isnt 'ENOENT'
|
throw err if err and err.code isnt 'ENOENT'
|
||||||
return if err?.code is 'ENOENT'
|
return if err?.code is 'ENOENT'
|
||||||
index = sources.indexOf source
|
index = sources.indexOf source
|
||||||
|
files = files.filter (file) -> not hidden file
|
||||||
sources[index..index] = (path.join source, file for file in files)
|
sources[index..index] = (path.join source, file for file in files)
|
||||||
sourceCode[index..index] = files.map -> null
|
sourceCode[index..index] = files.map -> null
|
||||||
for file in files when not hidden file
|
files.forEach (file) ->
|
||||||
compilePath (path.join source, file), no, base
|
compilePath (path.join source, file), no, base
|
||||||
else if topLevel or path.extname(source) is '.coffee'
|
else if topLevel or path.extname(source) is '.coffee'
|
||||||
watch source, base if opts.watch
|
watch source, base if opts.watch
|
||||||
|
|
Loading…
Add table
Reference in a new issue