You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Brian LeRoux <b...@brian.io> on 2013/09/03 02:37:40 UTC

Re: cli plugins 'alias'?

love this idea


On Sat, Aug 31, 2013 at 2:36 PM, Jonathan Bond-Caron <
jbondc@gdesolutions.com> wrote:

> Setting up the mobile spec app was tedious since I didn't know the
> dependencies.
>
> I wrote a small patch that allows to pull a plugin from a git subdirectory
> e.g. cordova plugin add
> https://github.com/jbondc/cordova-labs?subdir=cordova-deps-mobile-spec
> https://issues.apache.org/jira/browse/CB-4715
>
> It got me thinking there might an opportunity to make this less tedious
> with an 'alias'
>
> e.g. cordova plugin add @cordova-test
>
> The @ symbol signals an 'alias' (cordova-test) that cli would expand to
> "https://.../cordova-plugin-battery-status https://.../cordova-plugin-device
> etc..."
> The list of plugins simply gets passed to plugman.
>
> A couple of 'core' aliases could make it easier to get started with
> cordova, e.g.
> cordova plugin add @cordova-common
> cordova plugin add @cordova-test
> cordova plugin rm @cordova-test
>
> Could also be called packaged / collection /  grouped plugins.
>
> Thoughts?
>
>

Re: cli plugins 'alias'?

Posted by Michal Mocny <mm...@chromium.org>.
I think we've had that feature request before (specifically referring to
iOS console Logger plugin, being an optional dependency of the platform).

I don't think its been implemented, and I cannot find a JIRA issue, so
filed: CB-4735

-Michal

On Tue, Sep 3, 2013 at 2:56 PM, Jonathan Bond-Caron <jbondc@gdesolutions.com
> wrote:

> On Tue Sep 3 01:09 PM, Brian LeRoux wrote:
> > Or you could create cordova-plugin-core, cordova-plugin-chromeos, and
> > cordova-plugin-phonegap repos, with a plugin.xml that have the
> > dependencies
> > you describe to achieve the same result.
> >
> > As the other guys mentoin, there's many ways to do this now without
> > adding a
> > new feature which is the most pragmatic approach. (This will
> > be dramatically
> > easier and more obvious once
> > http://plugins.cordova.io ships at the end of hte
> > month.)
> >
>
> Sounds good to wait and see, might be ok to just distinguish required vs.
> non-required
>
> <dependency id="org.apache.cordova.test.echo" url="
> https://github.com/jbondc/cordova-labs.git" subdir="cordova-plugin-echo"
> required="false" />
>

RE: cli plugins 'alias'?

Posted by Jonathan Bond-Caron <jb...@gdesolutions.com>.
On Tue Sep 3 01:09 PM, Brian LeRoux wrote:
> Or you could create cordova-plugin-core, cordova-plugin-chromeos, and
> cordova-plugin-phonegap repos, with a plugin.xml that have the
> dependencies
> you describe to achieve the same result.
> 
> As the other guys mentoin, there's many ways to do this now without
> adding a
> new feature which is the most pragmatic approach. (This will
> be dramatically
> easier and more obvious once
> http://plugins.cordova.io ships at the end of hte
> month.)
> 

Sounds good to wait and see, might be ok to just distinguish required vs. non-required

<dependency id="org.apache.cordova.test.echo" url="https://github.com/jbondc/cordova-labs.git" subdir="cordova-plugin-echo" required="false" />	

Re: cli plugins 'alias'?

Posted by Anis KADRI <an...@gmail.com>.
On Tue, Sep 3, 2013 at 10:09 AM, Brian LeRoux <b...@brian.io> wrote:
> Or you could create cordova-plugin-core, cordova-plugin-chromeos, and
> cordova-plugin-phonegap repos, with a plugin.xml that have the dependencies
> you describe to achieve the same result.
>
> As the other guys mentoin, there's many ways to do this now without adding
> a new feature which is the most pragmatic approach. (This will be
> dramatically easier and more obvious once http://plugins.cordova.io ships
> at the end of hte month.)

+1

Re: cli plugins 'alias'?

Posted by Brian LeRoux <b...@brian.io>.
Or you could create cordova-plugin-core, cordova-plugin-chromeos, and
cordova-plugin-phonegap repos, with a plugin.xml that have the dependencies
you describe to achieve the same result.

As the other guys mentoin, there's many ways to do this now without adding
a new feature which is the most pragmatic approach. (This will be
dramatically easier and more obvious once http://plugins.cordova.io ships
at the end of hte month.)


On Tue, Sep 3, 2013 at 9:57 AM, jbondc@openmv.com <jb...@openmv.com> wrote:

> On Tue Sep 3 10:47 AM, Braden Shepherdson wrote:
> > Agreed with Michal. There's actually a third option coming too: we want
> > apps
> > to be able to name dependencies. So you should be able to copy
> > in the mobile-
> > spec app, then `cordova plugin add` or whatever the
> > syntax becomes, and it will
> > install all of the app's dependencies.
> >
>
> I'm less a fan of 'app dependencies', lots of frameworks and ways of
> thinking about how to organize an application. Is this a W3C, HTML5
> standard?
> To me this feels like Cordova would be defining what an app 'is'. That's
> fine for PhoneGap or Chrome apps but not necessarily for Cordova, at least
> the way I view the project.
>
> Agree with all points of Michal except:
>
> (1) We already have plugin's which support dependencies
> https://issues.apache.org/jira/browse/CB-4714
>
> Dependencies imply those plugins are 'required', that's not the same use
> case as an alias which just expands to a bunch of plugin names.
>
> An alias would make it easy to add plugins with 'no deps' attached. I
> would see this as part of the plugin repository discovery. Maybe people
> could register their own 'aliases':
> plugin add @cordova-stuff
> plugin add @chrome-stuff
> plugin add @phonegap-stuff
>
>

RE: cli plugins 'alias'?

Posted by "jbondc@openmv.com" <jb...@openmv.com>.
On Tue Sep 3 10:47 AM, Braden Shepherdson wrote:
> Agreed with Michal. There's actually a third option coming too: we want
> apps
> to be able to name dependencies. So you should be able to copy
> in the mobile-
> spec app, then `cordova plugin add` or whatever the
> syntax becomes, and it will
> install all of the app's dependencies.
> 

I'm less a fan of 'app dependencies', lots of frameworks and ways of thinking about how to organize an application. Is this a W3C, HTML5 standard?
To me this feels like Cordova would be defining what an app 'is'. That's fine for PhoneGap or Chrome apps but not necessarily for Cordova, at least the way I view the project. 

Agree with all points of Michal except:

(1) We already have plugin's which support dependencies
https://issues.apache.org/jira/browse/CB-4714

Dependencies imply those plugins are 'required', that's not the same use case as an alias which just expands to a bunch of plugin names.

An alias would make it easy to add plugins with 'no deps' attached. I would see this as part of the plugin repository discovery. Maybe people could register their own 'aliases':
plugin add @cordova-stuff
plugin add @chrome-stuff 
plugin add @phonegap-stuff


Re: cli plugins 'alias'?

Posted by Braden Shepherdson <br...@chromium.org>.
Agreed with Michal. There's actually a third option coming too: we want
apps to be able to name dependencies. So you should be able to copy in the
mobile-spec app, then `cordova plugin add` or whatever the syntax becomes,
and it will install all of the app's dependencies.

Braden


On Tue, Sep 3, 2013 at 10:00 AM, Andrew Grieve <ag...@chromium.org> wrote:

> Just updated the README.md to remove the pre-3.0 setup instructions.
>
>
> On Tue, Sep 3, 2013 at 9:53 AM, Michal Mocny <mm...@chromium.org> wrote:
>
> > I don't really think we need this feature:
> >
> > (1) We already have plugin's which support dependencies.  Combined with
> the
> > plugin repository, this means your alias feature is equivalent to
> creating
> > a do-nothing plugin that specifies its dependencies.
> >
> > (2) Also, we will soon have a way to specify application template (ie,
> > replace "hello world"), which combined with plugin dependencies for apps,
> > means that creating mobile spec will be as easy as `cordova create
> > PATH_TO_MOBILE_SPEC` and adding platforms.
> >
> > -Michal
> >
> >
> > On Mon, Sep 2, 2013 at 9:40 PM, lmnbeyond <lm...@gmail.com> wrote:
> >
> > > + 1  It's great
> > >
> > > Best Regards!
> > >
> > >
> > >
> > > On 2013-9-3, at 上午8:37, Brian LeRoux <b...@brian.io> wrote:
> > >
> > > > love this idea
> > > >
> > > >
> > > > On Sat, Aug 31, 2013 at 2:36 PM, Jonathan Bond-Caron <
> > > > jbondc@gdesolutions.com> wrote:
> > > >
> > > >> Setting up the mobile spec app was tedious since I didn't know the
> > > >> dependencies.
> > > >>
> > > >> I wrote a small patch that allows to pull a plugin from a git
> > > subdirectory
> > > >> e.g. cordova plugin add
> > > >>
> > https://github.com/jbondc/cordova-labs?subdir=cordova-deps-mobile-spec
> > > >> https://issues.apache.org/jira/browse/CB-4715
> > > >>
> > > >> It got me thinking there might an opportunity to make this less
> > tedious
> > > >> with an 'alias'
> > > >>
> > > >> e.g. cordova plugin add @cordova-test
> > > >>
> > > >> The @ symbol signals an 'alias' (cordova-test) that cli would expand
> > to
> > > >> "https://.../cordova-plugin-battery-status https://
> > > .../cordova-plugin-device
> > > >> etc..."
> > > >> The list of plugins simply gets passed to plugman.
> > > >>
> > > >> A couple of 'core' aliases could make it easier to get started with
> > > >> cordova, e.g.
> > > >> cordova plugin add @cordova-common
> > > >> cordova plugin add @cordova-test
> > > >> cordova plugin rm @cordova-test
> > > >>
> > > >> Could also be called packaged / collection /  grouped plugins.
> > > >>
> > > >> Thoughts?
> > > >>
> > > >>
> > >
> > >
> >
>

Re: cli plugins 'alias'?

Posted by Andrew Grieve <ag...@chromium.org>.
Just updated the README.md to remove the pre-3.0 setup instructions.


On Tue, Sep 3, 2013 at 9:53 AM, Michal Mocny <mm...@chromium.org> wrote:

> I don't really think we need this feature:
>
> (1) We already have plugin's which support dependencies.  Combined with the
> plugin repository, this means your alias feature is equivalent to creating
> a do-nothing plugin that specifies its dependencies.
>
> (2) Also, we will soon have a way to specify application template (ie,
> replace "hello world"), which combined with plugin dependencies for apps,
> means that creating mobile spec will be as easy as `cordova create
> PATH_TO_MOBILE_SPEC` and adding platforms.
>
> -Michal
>
>
> On Mon, Sep 2, 2013 at 9:40 PM, lmnbeyond <lm...@gmail.com> wrote:
>
> > + 1  It's great
> >
> > Best Regards!
> >
> >
> >
> > On 2013-9-3, at 上午8:37, Brian LeRoux <b...@brian.io> wrote:
> >
> > > love this idea
> > >
> > >
> > > On Sat, Aug 31, 2013 at 2:36 PM, Jonathan Bond-Caron <
> > > jbondc@gdesolutions.com> wrote:
> > >
> > >> Setting up the mobile spec app was tedious since I didn't know the
> > >> dependencies.
> > >>
> > >> I wrote a small patch that allows to pull a plugin from a git
> > subdirectory
> > >> e.g. cordova plugin add
> > >>
> https://github.com/jbondc/cordova-labs?subdir=cordova-deps-mobile-spec
> > >> https://issues.apache.org/jira/browse/CB-4715
> > >>
> > >> It got me thinking there might an opportunity to make this less
> tedious
> > >> with an 'alias'
> > >>
> > >> e.g. cordova plugin add @cordova-test
> > >>
> > >> The @ symbol signals an 'alias' (cordova-test) that cli would expand
> to
> > >> "https://.../cordova-plugin-battery-status https://
> > .../cordova-plugin-device
> > >> etc..."
> > >> The list of plugins simply gets passed to plugman.
> > >>
> > >> A couple of 'core' aliases could make it easier to get started with
> > >> cordova, e.g.
> > >> cordova plugin add @cordova-common
> > >> cordova plugin add @cordova-test
> > >> cordova plugin rm @cordova-test
> > >>
> > >> Could also be called packaged / collection /  grouped plugins.
> > >>
> > >> Thoughts?
> > >>
> > >>
> >
> >
>

Re: cli plugins 'alias'?

Posted by Michal Mocny <mm...@chromium.org>.
I don't really think we need this feature:

(1) We already have plugin's which support dependencies.  Combined with the
plugin repository, this means your alias feature is equivalent to creating
a do-nothing plugin that specifies its dependencies.

(2) Also, we will soon have a way to specify application template (ie,
replace "hello world"), which combined with plugin dependencies for apps,
means that creating mobile spec will be as easy as `cordova create
PATH_TO_MOBILE_SPEC` and adding platforms.

-Michal


On Mon, Sep 2, 2013 at 9:40 PM, lmnbeyond <lm...@gmail.com> wrote:

> + 1  It's great
>
> Best Regards!
>
>
>
> On 2013-9-3, at 上午8:37, Brian LeRoux <b...@brian.io> wrote:
>
> > love this idea
> >
> >
> > On Sat, Aug 31, 2013 at 2:36 PM, Jonathan Bond-Caron <
> > jbondc@gdesolutions.com> wrote:
> >
> >> Setting up the mobile spec app was tedious since I didn't know the
> >> dependencies.
> >>
> >> I wrote a small patch that allows to pull a plugin from a git
> subdirectory
> >> e.g. cordova plugin add
> >> https://github.com/jbondc/cordova-labs?subdir=cordova-deps-mobile-spec
> >> https://issues.apache.org/jira/browse/CB-4715
> >>
> >> It got me thinking there might an opportunity to make this less tedious
> >> with an 'alias'
> >>
> >> e.g. cordova plugin add @cordova-test
> >>
> >> The @ symbol signals an 'alias' (cordova-test) that cli would expand to
> >> "https://.../cordova-plugin-battery-status https://
> .../cordova-plugin-device
> >> etc..."
> >> The list of plugins simply gets passed to plugman.
> >>
> >> A couple of 'core' aliases could make it easier to get started with
> >> cordova, e.g.
> >> cordova plugin add @cordova-common
> >> cordova plugin add @cordova-test
> >> cordova plugin rm @cordova-test
> >>
> >> Could also be called packaged / collection /  grouped plugins.
> >>
> >> Thoughts?
> >>
> >>
>
>

Re: cli plugins 'alias'?

Posted by lmnbeyond <lm...@gmail.com>.
+ 1  It's great

Best Regards!



On 2013-9-3, at 上午8:37, Brian LeRoux <b...@brian.io> wrote:

> love this idea
> 
> 
> On Sat, Aug 31, 2013 at 2:36 PM, Jonathan Bond-Caron <
> jbondc@gdesolutions.com> wrote:
> 
>> Setting up the mobile spec app was tedious since I didn't know the
>> dependencies.
>> 
>> I wrote a small patch that allows to pull a plugin from a git subdirectory
>> e.g. cordova plugin add
>> https://github.com/jbondc/cordova-labs?subdir=cordova-deps-mobile-spec
>> https://issues.apache.org/jira/browse/CB-4715
>> 
>> It got me thinking there might an opportunity to make this less tedious
>> with an 'alias'
>> 
>> e.g. cordova plugin add @cordova-test
>> 
>> The @ symbol signals an 'alias' (cordova-test) that cli would expand to
>> "https://.../cordova-plugin-battery-status https://.../cordova-plugin-device
>> etc..."
>> The list of plugins simply gets passed to plugman.
>> 
>> A couple of 'core' aliases could make it easier to get started with
>> cordova, e.g.
>> cordova plugin add @cordova-common
>> cordova plugin add @cordova-test
>> cordova plugin rm @cordova-test
>> 
>> Could also be called packaged / collection /  grouped plugins.
>> 
>> Thoughts?
>> 
>>