There seems to be some confusion -- I think people are talking about
different things here, but perhaps it's just me ;)

I thought that Brian's original suggestion was about being able to host
Cordova platforms directly on NPM. That's why each one would require a
package.json. (which would probably end up in
<project>/platforms/<platform> in a project, but that's not the point of
it).

As an NPM project, we then would have the opportunity (though not the
obligation) to make all of the supporting scripts for each platform
(create, build, run, etc) part of the node module, for a uniform interface
that doesn't require going through the command line.

It's not about making platforms into CLI dependencies (any more than
plugins are CLI dependencies right now), or about making a cordova-based
project into a node package.

If that's right, then I support that -- I'd like the platforms to be
installable through npm, and to be versioned separately, installable
separately, and scriptable without having to spawn subshells.

And if I have it completely wrong, then let me know -- I'll just go back to
fixing File bugs ;)


On Mon, Jun 2, 2014 at 3:29 PM, Andrew Grieve <[email protected]> wrote:

> Not sure what your question is.
>
>
> On Mon, Jun 2, 2014 at 2:03 PM, Brian LeRoux <[email protected]> wrote:
>
> > *ahem
> >
> >
> > On Wed, May 28, 2014 at 11:20 AM, Brian LeRoux <[email protected]> wrote:
> >
> > > npm i [email protected]
> > >
> > > Right?
> > > On May 27, 2014 11:06 PM, "Andrew Grieve" <[email protected]>
> wrote:
> > >
> > >> Lazy loading is what will give us the ability to support multiple
> > versions
> > >> of platforms.
> > >>
> > >> If we don't support users choosing the version of the platform they
> > want,
> > >> then they will resist updating their version of CLI (like they do
> right
> > >> now).
> > >>
> > >> I'm very keen to allow users to chose their platform versions, just as
> > >> they
> > >> are able to choose their plugin versions.
> > >>
> > >>
> > >>
> > >> On Tue, May 27, 2014 at 5:57 PM, Mark Koudritsky <[email protected]>
> > >> wrote:
> > >>
> > >> > +1
> > >> >
> > >> > Steve published (some of?) the platforms on npm as part of the
> latest
> > >> > release.
> > >> > https://www.npmjs.org/package/cordova-android
> > >> > https://www.npmjs.org/package/cordova-ios
> > >> >
> > >> > CLI already require()s npm for downloading plugins from the
> registry.
> > >> > Extending this to platforms is on my todo list for this\next week.
> > >> > The "lazy" part of the loading was about caching, so we don't lose
> it
> > >> since
> > >> > npm does its own caching.
> > >> >
> > >> >
> > >> >
> > >> > On Tue, May 27, 2014 at 5:42 PM, Parashuram Narasimhan (MS OPEN
> TECH)
> > <
> > >> > [email protected]> wrote:
> > >> >
> > >> > > +1. This will also be a step towards releasing platforms
> > >> independently.
> > >> > > Will the CLI have a semver like dependency on the platform
> specified
> > >> > > somewhere ? Would the cli have to require('npm') and do the
> install?
> > >> > >
> > >> > > -----Original Message-----
> > >> > > From: [email protected] [mailto:[email protected]] On
> > >> Behalf
> > >> > Of
> > >> > > Brian LeRoux
> > >> > > Sent: Tuesday, May 27, 2014 2:20 PM
> > >> > > To: [email protected]
> > >> > > Subject: adding platforms to npm for dependency sanity
> > >> > >
> > >> > > We've discussed this but I'm not sure the whole idea has
> > crystalized.
> > >> My
> > >> > > proposal (based on previous discussions) below. I'll use iOS as an
> > >> > example
> > >> > > but this applies to all platforms supported by the CLI.
> > >> > >
> > >> > > First, we'd add two files:
> > >> > >
> > >> > > cordova-ios
> > >> > > |-package.json
> > >> > > '-index.js
> > >> > >
> > >> > > …I don't think I need to describe the utility of package.json but
> > >> > index.js
> > >> > > would expose programatic library apis:
> > >> > >
> > >> > > module.exports = { create:Function, run:Function, build:Function,
> > >> > > clean:Function, log:Function}
> > >> > >
> > >> > > We then publish to npm. That is it for now. Ideal future CLI uses
> > >> > > platforms just like other deps. We lose lazy loading but network
> and
> > >> disk
> > >> > > is cheap so it wasn't really important anyhow.
> > >> > >
> > >> > > Discuss!
> > >> > >
> > >> >
> > >>
> > >
> >
>

Reply via email to