-
Notifications
You must be signed in to change notification settings - Fork 244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change cordova-lib to execute plugin hooks without the need of Cordova project structure #236
base: master
Are you sure you want to change the base?
Conversation
7066b38
to
9c1936b
Compare
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. |
9c1936b
to
0763f9b
Compare
ping @omefire |
@galexandrov , will take a look when possible... |
function CordovaHooksRunner(projectRoot) { | ||
DefaultHooksRunner.call(this, projectRoot); | ||
var root = cordovaUtil.isCordova(projectRoot); | ||
if (!root) throw new CordovaError('Not a Cordova project ("' + projectRoot + '"), can\'t use hooks.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:nit please use if (...) { } else { }
(with curly braces).
I feel like the plugman changes ( |
I'd like to revive this PR. Hooks should run when using create scripts + plugman. |
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.