Skip to content

Commit 2f675ab

Browse files
committed
rebuild: refactor to use "todo" command objects
1 parent 4b9097a commit 2f675ab

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

lib/rebuild.js

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,10 @@ var log = require('npmlog')
77

88
function rebuild (gyp, argv, callback) {
99

10-
// first "clean"
11-
gyp.commands.clean([], function (err) {
12-
if (err) {
13-
// don't bail
14-
log.info('rebuild clean failed', err.stack);
15-
}
16-
17-
gyp.commands.configure([], function (err) {
18-
if (err) return callback(err);
19-
gyp.commands.build([], callback);
20-
});
21-
});
10+
gyp.todo.push(
11+
{ name: 'clean', args: [] }
12+
, { name: 'configure', args: [] }
13+
, { name: 'build', args: [] }
14+
)
15+
process.nextTick(callback)
2216
}

0 commit comments

Comments
 (0)