From 26105034da4fcce7ac883c899d781f016559310d Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 8 Nov 2018 00:38:48 +0800 Subject: switch to vuepress --- node_modules/node-pre-gyp/lib/rebuild.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 node_modules/node-pre-gyp/lib/rebuild.js (limited to 'node_modules/node-pre-gyp/lib/rebuild.js') diff --git a/node_modules/node-pre-gyp/lib/rebuild.js b/node_modules/node-pre-gyp/lib/rebuild.js new file mode 100644 index 00000000..1e3a885c --- /dev/null +++ b/node_modules/node-pre-gyp/lib/rebuild.js @@ -0,0 +1,21 @@ +"use strict"; + +module.exports = exports = rebuild; + +exports.usage = 'Runs "clean" and "build" at once'; + +var fs = require('fs'); +var napi = require('./util/napi.js'); + +function rebuild (gyp, argv, callback) { + var package_json = JSON.parse(fs.readFileSync('./package.json')); + var commands = [ + { name: 'clean', args: [] }, + { name: 'build', args: ['rebuild'] } + ]; + commands = napi.expand_commands(package_json, commands); + for (var i = commands.length; i !== 0; i--) { + gyp.todo.unshift(commands[i-1]); + } + process.nextTick(callback); +} -- cgit v1.2.3