Skip to content

Commit dfa3b03

Browse files
committed
fix(bundle): rebuild native bindings postinstall
1 parent af2db90 commit dfa3b03

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

lib/tasks/postinstall.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
var execSync = require('child_process').execSync
2+
3+
var previousGlobalConfig = process.env.npm_config_global;
4+
process.env.npm_config_global = 'false';
5+
6+
var cmd = 'npm rebuild node-sass spawn-sync';
7+
cmd += process.platform === 'darwin' ? ' fsevents' : '';
8+
9+
execSync(cmd, {stdio: [0,1,2]});
10+
process.env.npm_config_global = previousGlobalConfig;
11+

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"full-release": "node lib/tasks/bumpversion --npmInstall --git --npmPublish",
1616
"test": "npm run jasmine",
1717
"e2e": "jasmine-node --captureExceptions ./e2e",
18-
"jasmine": "jasmine-node --captureExceptions ./spec"
18+
"jasmine": "jasmine-node --captureExceptions ./spec",
19+
"postinstall": "node lib/tasks/postinstall"
1920
},
2021
"keywords": [
2122
"ionic",

0 commit comments

Comments
 (0)