cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michal Mocny <mmo...@chromium.org>
Subject Re: cordova xxx add - is there a problem?
Date Mon, 03 Nov 2014 18:25:19 GMT
I'm not sure that we should change the "cordova plugin/platform add" cli
command to not actually make the changes to platforms/ or plugins/, but
since both commands run "cordova prepare", we could move the logic to the
prepare step and then add a "--skip-prepare" or "--save-only" type flag for
the add commands?

Alternatively, we could do something like what phonegap-cli does and have a
"cordova remote plugin add" to differentiate local installs from mere
metadata updates.

Either way, seems this is related to Gorkems work to add platform / plugin
deps to config.xml (though, the current implementation as it exists is
insufficient).

-Michal

On Fri, Oct 31, 2014 at 1:48 PM, Frederico Galvão <
frederico.galvao@pontoget.com.br> wrote:

> Well, afaik 'cordova plugin add <>' only does 'cordova prepare' after the
> plugin stuff is done, and 'cordova prepare' works even without native SDKs.
>
> 2014-10-30 23:43 GMT-02:00 Andrew Grieve <agrieve@chromium.org>:
>
> > There've been some changes to CLI in the last month that fix Android
> > requiring an SDK to run create & plugin add. Likewise, a fix just went in
> > this week (last week?) that fixes the slash problem for xcode project
> files
> > on windows.
> >
> > That said, I like your idea of not modifying platforms/ outside of
> prepare
> > / build.
> >
> > On Thu, Oct 30, 2014 at 10:48 AM, Treggiari, Leo <
> leo.treggiari@intel.com>
> > wrote:
> >
> > > Is there an issue with the semantics of "plugin add" and "platform
> add"?
> > >
> > > This is just a high level query to see if this is something worth
> > > discussing in more detail.  I don't know exactly what each Cordova CLI
> > > command does.  My knowledge is based upon reading documentation (which
> is
> > > sometimes wrong as noted in recent e-mails) and experimentation.
> > >
> > > What does "add" do?
> > >
> > >
> > > 1.      For "plugin add" fetches the plugin sources.  For "platform
> add"
> > > fetches the platform implementation if necessary.
> > >
> > > 2.      Stores some metadata somewhere indicating that the plugin or
> > > platform was added?  What and where this metadata is stored should be
> > > better documented.
> > >
> > > 3.      For "plugin add", processes plugin variables, if specified,
> which
> > > modifies the plugin sources.
> > >
> > > 4.      Creates/modifies the native platform "project" (e.g. a Visual
> > > Studio, Eclipse, or Xcode, etc. project) to make the appropriate
> changes.
> > >
> > > If  "plugin add" or "platform add" do more than this, I'd appreciate
> > being
> > > educated.
> > >
> > > My question is, should "add" stop at step #2 and leave the rest to the
> > > prepare step?
> > >
> > > Here's why:
> > >
> > > *        We see there is an issue with multiple developers on the same
> > > project on different platforms.  E.g. when one developer is on Windows
> > > working on the Windows and Android versions of the project and another
> is
> > > on Mac working on the iOS version of the project.  If the shared
> project
> > > wants to add all three platforms (which it does...) then Cordova CLI
> has
> > > problems.  Basically because not much else than the "create" command
> > works
> > > without having native SDKs installed.  Would many issues be solved if
> the
> > > "add" command did not require the presence of native SDKs, but rather
> > > "prepare" did?
> > >
> > > *        There seems to be an issue with the co-existence of Cordova
> CLI
> > > and IDEs, and in particular with IDEs that want to build in the cloud
> > > without the requirement of native SDKs.  It would be ideal if multiple
> > > users on the same project could use different tools - e.g. one use the
> > > command line and one use the IDE.  The basic "definition" of a Cordova
> > CLI
> > > project, i.e. the part that needs to be shared, is the list of
> platforms
> > > and plugins and the settings in the top level config.xml.  If the basic
> > > definition of the project could be created/edited from both the CLI and
> > > various IDEs, then the rest of the development workflow (prepare,
> build,
> > > emulate, etc.) could be implemented in different ways, but the project
> > > definition could still be shared.
> > >
> > > P.S. the "remove" command has similar semantics.
> > >
> > > Thanks,
> > > Leo
> > >
> >
>
>
>
> --
>
> *Frederico Galvão*
>
> Diretor de Tecnologia
>
> PontoGet Inovação Web
>
>
> ( +55(62) 8131-5720
>
> * www.pontoget.com.br <http://www.pontoget.com/>
>

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