From 70cea03b4b16f4b862c1214356520b1b754a4394 Mon Sep 17 00:00:00 2001 From: Martin Probst Date: Thu, 2 Apr 2015 13:09:47 -0700 Subject: [PATCH] fix(build): Only return directories from subDirs() --- tools/build/util.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/build/util.js b/tools/build/util.js index 19287fe0d9..2c74f08846 100644 --- a/tools/build/util.js +++ b/tools/build/util.js @@ -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) {