Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

rebuild: refactor to use "todo" command objects

  • Loading branch information...
commit 2f675ab223e8ee191d6e191276e4275bc6f1e80c 1 parent 4b9097a
@TooTallNate authored
Showing with 6 additions and 12 deletions.
  1. +6 −12 lib/rebuild.js
View
18 lib/rebuild.js
@@ -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)
}
Please sign in to comment.
Something went wrong with that request. Please try again.