Skip to content

Commit

Permalink
rebuild: refactor to use "todo" command objects
Browse files Browse the repository at this point in the history
  • Loading branch information
TooTallNate committed Jul 16, 2012
1 parent 4b9097a commit 2f675ab
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions lib/rebuild.js
Expand Up @@ -7,16 +7,10 @@ var log = require('npmlog')

function rebuild (gyp, argv, callback) {

// first "clean"
gyp.commands.clean([], function (err) {
if (err) {
// don't bail
log.info('rebuild clean failed', err.stack);
}

gyp.commands.configure([], function (err) {
if (err) return callback(err);
gyp.commands.build([], callback);
});
});
gyp.todo.push(
{ name: 'clean', args: [] }
, { name: 'configure', args: [] }
, { name: 'build', args: [] }
)
process.nextTick(callback)
}

0 comments on commit 2f675ab

Please sign in to comment.