1
0
mirror of https://github.com/musix-org/musix-oss synced 2025-01-11 04:54:48 +00:00
musix-oss/node_modules/node-pre-gyp/lib/rebuild.js
2020-03-04 13:43:21 +02:00

22 lines
567 B
JavaScript

"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, gyp.opts, commands);
for (var i = commands.length; i !== 0; i--) {
gyp.todo.unshift(commands[i-1]);
}
process.nextTick(callback);
}