Permalink
Browse files

Propagate args down to sub builds when walking

  • Loading branch information...
1 parent 50bc7bc commit c4253140c4cae4aabd5e8c6ee6bc753dd31dda80 @davglass committed Sep 4, 2012
Showing with 17 additions and 2 deletions.
  1. +17 −2 lib/walk.js
View
@@ -16,7 +16,22 @@ exports.run = function (options) {
log.info('racing the directories');
var modStack = new Stack(),
start = new Date(),
- mods = [];
+ mods = [],
+ args = [];
+
+ if (options.compressor) {
+ args.push('--compressor');
+ }
+ if (options.semi === false) {
+ args.push('--no-semi');
+ }
+ if (options.coverage === false) {
+ args.push('--no-coverage');
+ }
+
+ if (args.length) {
+ log.info('using ' + args.join(' '));
+ }
fs.readdir(process.cwd(), modStack.add(function (err, dirs) {
dirs.forEach(function (mod) {
@@ -50,7 +65,7 @@ exports.run = function (options) {
run = function () {
var mod = mods.pop(), child;
if (mod) {
- child = spawn('shifter', [], {
+ child = spawn('shifter', args, {
cwd: path.join(process.cwd(), mod),
stdio: ['ignore', 'ignore', process.stderr]
});

0 comments on commit c425314

Please sign in to comment.