1
2
3
4
5
6
7
8
9
10
11
12
13
| #!/usr/bin/env node
|
| const {spawn} = require('child_process');
|
| if (process.env.npm_config_build_from_source === 'true') {
| build();
| }
|
| function build() {
| spawn('node-gyp', ['rebuild'], { stdio: 'inherit', shell: true }).on('exit', function (code) {
| process.exit(code);
| });
| }
|
|