You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some cases nativescript-hook cannot be used. This plugin is used by developers to easily create and maintain hooks for their plugins. As it has to execute some work on postinstall of the plugin, it has to be defined as dependency, not devDependency. However defining it as dependency is including it in the real application, that's installed on the device. But in case you define it as devDependency of the plugin, it will not be installed when calling npm install --save <my plugin> and the postinstall will fail.
Idea:
Always use nativescript-hook as devDependency of the plugin. On postintall of the nativescript-hook or prepublish of the plugin, create postinstall.js and preuninstall.js which should not depend on nativescript-hook, but should do the same as it would do.
Workflow in such case:
Create plugin
Add info in the package.json for required hooks
Add nativescript-hook as dependency - this should add prepublish step to your package.json
In some cases
nativescript-hook
cannot be used. This plugin is used by developers to easily create and maintain hooks for their plugins. As it has to execute some work on postinstall of the plugin, it has to be defined as dependency, not devDependency. However defining it as dependency is including it in the real application, that's installed on the device. But in case you define it asdevDependency
of the plugin, it will not be installed when callingnpm install --save <my plugin>
and the postinstall will fail.Idea:
Workflow in such case:
postinstall.js
andpreuninstall.js
with correct content. The content should execute the following code: https://github.com/NativeScript/nativescript-hook/blob/master/index.js#L74Related issue: #1572
The text was updated successfully, but these errors were encountered: