cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michal Mocny <mmo...@chromium.org>
Subject Re: 3rd party Plugin code structure
Date Thu, 20 Dec 2012 19:49:40 GMT
Oh right, I remember seeing some of that doc when Mike was poking around.

Thanks for the links/refresher!

-Michal


On Thu, Dec 20, 2012 at 2:44 PM, Shazron <shazron@gmail.com> wrote:

> I think the phonegap-plugins repo structure was way before we decided to
> organize it better, ie the plugin spec. More details here, with some
> example plugins used by PG Build:
>
> http://shazronatadobe.wordpress.com/2012/11/07/cordova-plugins-put-them-in-your-own-repo-2/
>
> I think for Cordova the ongoing work for pluginstall is actually in
> plugman: https://github.com/imhotep/plugman
> I'm not sure if the spec is "official" yet but definitely in draft status.
>
>
> On Thu, Dec 20, 2012 at 11:03 AM, Michal Mocny <mmocny@google.com> wrote:
>
> > Seems that our thirdparty plugins are platform-centric; with javascript
> not
> > written to be shared across platforms.
> >
> > Even if individual contributors are not willing to write implementations
> > for other platforms, or if a plugin only really applies to a single
> > platform, I think we should still provide good plugin structure
> conventions
> > that could scale to multiple platform implementations in the future.
> >
> > As far as I'm aware, this was the case with core plugins at some point,
> and
> > we made a big change to unify the js, right?
> >
> > Well, I think that plugin structure should be more like:
> >
> > plugin_name/
> > - common/ [js code]
> > - platform/
> >  - ios/ [native code]
> >  - android/ [native code]
> >  - etc..
> >
> > and less like we have now
> >
> > ios/plugin_name/
> >  - [js code]
> >  - [native code]
> >
> > android/plugin_name/
> >  - [js code -- different api]
> >  - [native code]
> >
> > I don't think we need to redo whats there now, but it would be nice to
> > decide on a structure, put up a skeleton for starting with, and mention
> it
> > in the Readme.
> >
> > (I ask before I'm going to be adding an android version of
> WebNotifications
> > some day, and I really don't want to fork the JS)
> >
> > -Michal
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message