Shazron's Cordova (aka PhoneGap) Blog

at Adobe Systems Inc.

Cordova plugins? Put them in your own repo

with 18 comments

[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:

  1. https://github.com/phonegap-build/BarcodeScanner
  2. https://github.com/phonegap-build/ChildBrowser
  3. https://github.com/phonegap-build/GAPlugin
  4. https://github.com/shazron/TestFlightPlugin
  5. 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.

About these ads

Written by shazron

November 7, 2012 at 11:40 pm

Posted in cordova, phonegap

18 Responses

Subscribe to comments with RSS.

  1. [...] Cordova plugins? Put them in your own repo [...]

  2. Just moved my plugins into separate repositories.

    Here’s how to prune all unnecessary history (change the command according to your plugin’s path):

        git filter-branch --subdirectory-filter iOS/TabBar -- --all
    

    AndiDog

    November 8, 2012 at 10:44 am

  3. Started moving LocalNotifications stuff to a separate repo – https://github.com/olore/LocalNotifications

    Brian Oloreā„¢ (@olore)

    December 6, 2012 at 12:28 am

  4. 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

  5. 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

  6. 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

  7. 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

  8. 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

  9. 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

  10. 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

  11. 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


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 1,412 other followers

%d bloggers like this: