-
Notifications
You must be signed in to change notification settings - Fork 340
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
Install plugin only in a specific platform (defined in package.json) #552
Comments
I know this isn't very clean and not a permanent solution, but a plugin could be forked and the other implementations could be removed from the |
I can fork a plugin to remove a platform but then I will not fetch the updates the plugin's creator will eventually make for the platform where it does work. Do you think this is doable and integratable with a hook? Which before event should I process? Is Cordova Cli based on node? If you want I can develop some hook in nodejs to implement this feature. |
I'm not really sure what is involved... not exactly experienced with that of the Cordova codebase... but I think the hook idea is definitely worth a try. Perhaps the https://cordova.apache.org/docs/en/10.x/guide/appdev/hooks/index.html |
Hi @breautek I know hooks, my projects have several hooks, but for now I just followed your tip and forked the plugin.
Yes, it seems the way to go, but is If I develop such hook it would be nice to share it, is there any repository of those general tool hooks? Once I also developed a nice hook for example for having handlebars partials in html and not a single big HTML file, but there's no easy way to share it with others for them to integrate in their projects. |
Feature Request
Motivation Behind Feature
Many plugins do work only in a specific platform and crash in other platforms during build. Furthermore many plugins are specifically designed to a specific platform only, but their creators did not take that into account. There's also a popular request for this in Stackoverflow.
Feature Description
It would be very advantageous to have in
package.json
some sort of way to inform that we just want a specific plugin installed only in a specific platform, and not in all platforms.For example something like this in
package.json
Alternatives or Workarounds
We can use plugman but it's not reliable nor there is a way to tell other people that we want a certain plugin installed only on a specific platform. I suppose we can also use a hook, but I was wondering before which event should we consider to process. We can also have git branches with different versions of
package.json
for different platforms.The best way would be undoubtedly to have that information directly stored in
package.json
.The text was updated successfully, but these errors were encountered: