cordova-lib
cordova-lib copied to clipboard
Change cordova-lib to execute plugin hooks without the need of Cordova project structure
Change cordova-lib to execute plugin hooks defined in plugin.xml without the need of Cordova project structure and extend Plugman with extra command argument (--nohooks) for preventing plugin hooks execution. By default the hooks will be executed.
What's the reason behind this proposed change ? What use case does this fulfill ?
In our case we don't use the Cordova CLI we use cordova-{platform} scripts for project creation and that's why we don't have the Cordova CLI Project structure. But it seems that the hooks execution is tightly bound with the Cordova Project structure and more specific with the existence of cordova folder. The condition for hook execution in plugman is cordovaUtil.isCordova(), which means that when we use cordova-{platform} scripts for project creation and cordova-plugman for plugin management the hooks defined in plugin.xml will not be executed.
ping @omefire
@galexandrov , will take a look when possible...
I feel like the plugman changes ( run_hooks ) should be part of a separate pull request.
I'd like to revive this PR. Hooks should run when using create scripts + plugman.