Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
prcolaco committed Nov 23, 2019
1 parent d762fe3 commit 30569b8
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions install.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
const
exec = require('child_process').exec,
gyp = exec('node-gyp rebuild', {cwd: __dirname}),
verbose = process.env['npm_package_config_verbose'] != null ?
process.env['npm_package_config_verbose'] === 'true'
: false;

gyp.stdout.on('data', function(data) {
if (verbose)
process.stdout.wirte(data);
});

gyp.stderr.on('data', function(data) {
if (verbose)
process.stderr.wirte(data);
});

gyp.on('exit', function(code) {
if (code !== 0) {
console.err('Native code compile failed!!');
}
else {
console.log('Native extension compilation successful!');
}

process.exit();
});

0 comments on commit 30569b8

Please sign in to comment.