fix(build): Only return directories from subDirs()

This commit is contained in:
Martin Probst 2015-04-02 13:09:47 -07:00
parent a027912891
commit 70cea03b4b
1 changed files with 6 additions and 3 deletions

View File

@ -1,7 +1,8 @@
var Q = require('q');
var fs = require('fs');
var path = require('path');
var minimatch = require('minimatch');
var glob = require('glob');
var path = require('path');
var Q = require('q');
module.exports = {
processToPromise: processToPromise,
@ -14,7 +15,9 @@ module.exports = {
};
function subDirs(dir) {
return [].slice.call(glob.sync('*/', {cwd: dir}));
return fs.readdirSync(dir).filter(function(file) {
return fs.statSync(path.join(dir, file)).isDirectory();
});
}
function forEachSubDir(dir, callback) {