Skip to content

Commit

Permalink
fix(bundle): rebuild native bindings postinstall
Browse files Browse the repository at this point in the history
  • Loading branch information
tlancina committed Mar 28, 2016
1 parent af2db90 commit dfa3b03
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
11 changes: 11 additions & 0 deletions lib/tasks/postinstall.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
var execSync = require('child_process').execSync

var previousGlobalConfig = process.env.npm_config_global;
process.env.npm_config_global = 'false';

var cmd = 'npm rebuild node-sass spawn-sync';
cmd += process.platform === 'darwin' ? ' fsevents' : '';

execSync(cmd, {stdio: [0,1,2]});
process.env.npm_config_global = previousGlobalConfig;

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"full-release": "node lib/tasks/bumpversion --npmInstall --git --npmPublish",
"test": "npm run jasmine",
"e2e": "jasmine-node --captureExceptions ./e2e",
"jasmine": "jasmine-node --captureExceptions ./spec"
"jasmine": "jasmine-node --captureExceptions ./spec",
"postinstall": "node lib/tasks/postinstall"
},
"keywords": [
"ionic",
Expand Down

0 comments on commit dfa3b03

Please sign in to comment.