Cordova plugins? Put them in your own repo
[edited: removed reference to pluginstall which is PhoneGap Build centric, to Plugman which is based on pluginstall but is Cordova centric, and more frequently updated]
Right now, there is one repo that contains the majority of plugins available for Cordova at: http://github.com/phonegap/phonegap-plugins
We don’t want to “clutter” this repo with code anymore. Authors should maintain the code in their own repos and publish them to the Cordova Plugin Registry.
Having the plugins in separate repos also enables less clutter for pull requests and bugs, with it all being in one repo it is hard to get attention for an issue since that can be buried. I know that I like to fix some of my plugins, but it’s hard with it all lumped in there with other unrelated plugin issues.
As a reminder, this is how to write a Plugin:
http://docs.cordova.io/en/edge/guide_plugin-development_index.md.html#Plugin%20Development%20Guide
For examples of plugins that conform to the Cordova Plugin spec and are plugman-able:
- https://github.com/phonegap-build/BarcodeScanner
- https://github.com/phonegap-build/ChildBrowser
- https://github.com/phonegap-build/GAPlugin
- https://github.com/shazron/TestFlightPlugin
- https://github.com/shazron/KeychainPlugin
I’ve already moved out the plugins that I started implementation on (iAdPlugin, KeychainPlugin, PayPalPlugin, TorchPlugin, TestFlightPlugin). I suggest that you do the same.
[…] Cordova plugins? Put them in your own repo […]
Cordova plugins? Put them in your own repo | SDK News
November 8, 2012 at 7:59 am
Just moved my plugins into separate repositories.
Here’s how to prune all unnecessary history (change the command according to your plugin’s path):
AndiDog
November 8, 2012 at 10:44 am
Started moving LocalNotifications stuff to a separate repo – https://github.com/olore/LocalNotifications
Brian Olore™ (@olore)
December 6, 2012 at 12:28 am
With this new model, should the repo in which the plugin resides have to be a GitHub repo or can it be a ‘regular’ git repo on a private server ?
bijan
December 17, 2012 at 8:29 pm
Any publicly accessible git repo would do, although discovery (and interaction for bugs) would be hard if it’s not on some site like Github or Bitbucket
shazron
December 21, 2012 at 12:05 am
I have put my Phonegap plugin in my own repo but how do I “just put a pointer in a README.md in phonegap-plugins (perhaps in the same hierarchy)”?
Remco Beugels
January 3, 2013 at 4:32 pm
Create a folder in the Android folder in the repo, add a README.md with your details, then commit it to your forked Github repo. Then send a pull request.
shazron
January 3, 2013 at 8:52 pm
I’ve updated the post to refer to Plugman instead of Pluginstall. Use Plugman in the future since it is being actively developed.
shazron
January 5, 2013 at 6:00 pm
Wouldn’t it make more sense to just set up a wiki instead of having to submit pull requests?
bar
January 13, 2013 at 11:49 pm
Sure. The main reason is for discovery — and the repo is just a temporary solution (and it is the most well known) until we figure out a permanent listing.
shazron
January 14, 2013 at 10:05 pm
Hi Shazron,
I am trying to add calendar plugin for cordova 3.0.0, but we get the following error:
ERROR: Plugin ‘calendarPlugin’ not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.
2013-07-30 21:09:56.059 VPA Phonegap[34341:c07] -[CDVCommandQueue executePending] …….
Is there a solution for this?
puttavi
July 30, 2013 at 4:39 pm
Where is the repo link for this code? It’s exactly what it says in the error, you haven’t configured your config.xml to add the plugin mapping. Let me know.
shazron
July 30, 2013 at 9:34 pm
See AppRate plugin https://github.com/pushandplay/cordova-plugin-apprate
pushandplay
August 17, 2013 at 11:42 am
If you want others to find your plugin and it conforms to the cordova plugin specification, you can submit it here: http://www.plugreg.com/
Lee
October 11, 2013 at 9:03 am
This all sounds great, but what is the plan for the plugins that the original authors are no longer maintaining?
Matias Singers
November 5, 2013 at 6:00 am
In an ideal world, we would migrate them all, but that is not feasible. Firstly, the code is contributed – and tracking down all the authors to either release them under Apache v2 license etc is just a thing that we don’t want to do. We just don’t have the people for this, doing it for each plugin. What is feasible is — and we need the community to respond — targeting the few plugins that the community really uses, and migrate those, and handle all the overhead needed before “taking it as our own” (whether Apache, or Adobe, etc).
Lastly, owning the code is a big responsibility in testing (with multiple iOS, Android versions) and maintenance, and is not a something with zero cost — what with all the core committers etc busy with maintaining the core code and core plugins as well.
shazron
November 5, 2013 at 5:38 pm
Is there a quick and dirty method of adding a signpost to the repo for a plugin (similar to how we used the README in the old repo)?
The Plugman interface seems like a learning curve which I don’t currently have the time to understand. With the old repo now depreciated, I assume I need to register the Plugin into the Cordova registry otherwise no-one is ever going to find the Plugin again – thus I’m looking for the simplest path to achieve that.
Mark Taylor
November 7, 2013 at 8:52 am
Hi Mark, I’m afraid not. Contact me (in the About section) regarding converting your plugin to be plugman capable, I’ll help you out.
shazron
November 7, 2013 at 7:34 pm
hii I’m new in phonegap development. i m using iAd plugin but it is not working….please help me…
Varsha
August 8, 2014 at 7:30 am