cordova-lib icon indicating copy to clipboard operation
cordova-lib copied to clipboard

Change cordova-lib to execute plugin hooks without the need of Cordova project structure

Open galexandrov opened this issue 10 years ago • 6 comments

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.

galexandrov avatar Jun 05 '15 07:06 galexandrov

What's the reason behind this proposed change ? What use case does this fulfill ?

omefire avatar Jul 17 '15 08:07 omefire

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.

isCordova() method implementation

galexandrov avatar Jul 28 '15 09:07 galexandrov

ping @omefire

galexandrov avatar Aug 12 '15 14:08 galexandrov

@galexandrov , will take a look when possible...

omefire avatar Aug 13 '15 20:08 omefire

I feel like the plugman changes ( run_hooks ) should be part of a separate pull request.

omefire avatar Aug 16 '15 13:08 omefire

I'd like to revive this PR. Hooks should run when using create scripts + plugman.

stevengill avatar May 12 '16 01:05 stevengill