Skip to content

Commit db91878

Browse files
Merge pull request #3 from EddyVerbruggen/master
Fix postinstall/preuninstall hook installation commands
2 parents 6782e56 + a339349 commit db91878

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ Add a post-install and pre-uninstall script to your `package.json`, if you haven
3838

3939
The post-install script (`postinstall.js` in the example) should contain the following line:
4040
```
41-
require('nativescript-hook').postinstall(__dirname);
41+
require('nativescript-hook')(__dirname).postinstall();
4242
```
4343

4444
The pre-uninstall script (`preuninstall.js` in the example) should contain the following line:
4545
```
46-
require('nativescript-hook').preuninstall(__dirname);
46+
require('nativescript-hook')(__dirname).preuninstall();
4747
```
4848

4949
These two hooks will take care of installing and removing the hooks from the NativeScript project, when your module is installed or uninstalled.

0 commit comments

Comments
 (0)