Skip to content

Commit e4ce677

Browse files
Fix usage of nativescript-hook
Use new version of nativescript-hook and fix the usage. Without the fix `tns install babel` is failing.
1 parent f6c5c17 commit e4ce677

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@
2626
"dependencies": {
2727
"glob": "^5.0.15",
2828
"minimatch": "^3.0.0",
29-
"nativescript-hook": "^0.1.1"
29+
"nativescript-hook": "^0.2.0"
3030
}
3131
}

postinstall.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
require('nativescript-hook').postinstall(__dirname);
1+
var hook = require('nativescript-hook')(__dirname);
2+
hook.postinstall();
23

34
var projectDir = process.env['TNS_PROJECT_DIR'];
45
require('child_process').exec('npm install --save-dev babel-core', { cwd: projectDir }, function (err, stdout, stderr) {

preuninstall.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
require('nativescript-hook').preuninstall(__dirname);
1+
require('nativescript-hook')(__dirname).preuninstall();

0 commit comments

Comments
 (0)