cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Koudritsky <kam...@google.com>
Subject Re: Directory Structure - CLI directory config proposal
Date Mon, 11 Aug 2014 14:56:13 GMT
I like the way it looks now, but I would argue that we need to take it
another step further and make it a CordovaProject class that should only be
instantiated once and contain all the info of ProjectMeta + most of the
info passed around in the ad-hoc opts objects.

I'm somewhat against passing JSON strings as command line parameters. Would
prefer to expose this to the command line via something along the lines of
--config-mixin=some_file.json and as part of the JS API via something like
cordova.create(...., config_mixin).

All this said, I like the change the way it is right now.



On Sun, Aug 10, 2014 at 12:39 PM, Sergey Grebnov (Akvelon) <
v-segreb@microsoft.com> wrote:

> Hi guys, sharing implementation prototype for this feature[1] . please let
> me know what do you think.
>
> Highlights:
> 1. Introduced project settings class (ProjectMeta) which wraps config.json
> and exposes project setting info including folders locations (now passed to
> cordova methods instead of config.json)
> 2. Support of the following cordova folders and their default values (no
> changes here)
>         ProjectMeta.defaultWwwPath = 'www';
>         ProjectMeta.defaultPlatformsPath = 'platforms';
>         ProjectMeta.defaultHooksPath = 'hooks';
>         ProjectMeta.defaultMergesPath = 'merges';
>         ProjectMeta.defaultPluginsPath = 'plugins';
>
> 3. Non-default folders structure could be passed during 'cordova create ..'
>         cordova create hello io.cordova.hellocordova HelloCordova "{
> ""id"": ""io.cordova.hellocordova"", ""name"": ""HelloCordova"",
>  ""wwwPath"": ""."", ""platformsPath"": ""cordova_components/platforms"",
>  ""pluginsPath"": ""cordova_components/plugins"", ""hooksPath"":
> ""cordova_components/hooks"",  ""mergesPath"":
> ""cordova_components/merges""  }"
>
> 4. More details and examples could be found here [2]
> 5. Source code could be found here: [3], [4]
>
> [1] https://issues.apache.org/jira/browse/CB-7205
> [2] https://gist.github.com/daserge/aee3d3503c93accf3f0a
> [3]
> https://github.com/MSOpenTech/cordova-lib/tree/configurable-directories/
> [4]
> https://github.com/MSOpenTech/cordova-cli/tree/configurable-directories/
>
> Thx!
> Sergey
> From: Lisa Seacat DeLuca [mailto:ldeluca@us.ibm.com]
> Sent: Thursday, July 10, 2014 11:50 AM
> To: dev@cordova.apache.org
> Subject: Re: Directory Structure - CLI directory config proposal
>
> I didn't have anything in mind as far as where the settings could be made
> available.  I was more broaching the subject to see if it's possible or if
> there would be a lot of code rewrite to make it work.  I'm not as familiar
> with how the CLI works or how the code decides to place certain files in
> certain locations on build and creation.  So defaulting to the rest of you
> for that expertise.  IBM would like to see this happen from a product
> standpoint.
>
>
> Lisa
> @LisaSeacat
>
>
>
> Gorkem Ercan ---07/08/2014 03:36:54 PM---On Tue, Jul 08, 2014 at
> 09:02:03AM -0400, Michal Mocny wrote: > Lets see what Lisa had in mind, but
>
> From: Gorkem Ercan <gorkem.ercan@gmail.com>
> To: dev@cordova.apache.org
> Date: 07/08/2014 03:36 PM
> Subject: Re: Directory Structure - CLI directory config proposal
> ________________________________________
>
>
>
>
> On Tue, Jul 08, 2014 at 09:02:03AM -0400, Michal Mocny wrote:
> > Lets see what Lisa had in mind, but I always assumed it fit into
> > .cordova/config.json.
> >
>
> Do you consider the contents of .cordova/config.json to be shared among
> developers of a project.
>
>
> >
> > On Tue, Jul 8, 2014 at 8:46 AM, Andrew Grieve <agrieve@chromium.org>
> wrote:
> >
> > > Wondering what this will look like. config.xml settings?
> > > .cordova/config.json? A new config file?
> > >
> > >
> > > On Mon, Jul 7, 2014 at 2:43 PM, Parashuram Narasimhan (MS OPEN TECH) <
> > > panarasi@microsoft.com> wrote:
> > >
> > > > +1 to this proposal. If we are able to agree on a proposal, we can
> > > > contribute with code too.
> > > >
> > > > -----Original Message-----
> > > > From: mmocny@google.com [mailto:mmocny@google.com] On Behalf Of
> Michal
> > > > Mocny
> > > > Sent: Monday, July 7, 2014 7:52 AM
> > > > To: dev
> > > > Subject: Re: Directory Structure - CLI directory config proposal
> > > >
> > > > I'd like to see this happen.
> > > >
> > > > Specifically, I would like to see support for a directory structure
> like
> > > > this:
> > > >
> > > > MyApp/
> > > >   cordova_components/
> > > >     platforms/
> > > >     plugins/
> > > >   bower_components/...
> > > >   node_modules/...
> > > >   ...Rest of contents of MyApp are basically www/
> > > >
> > > > And this cannot use a symlink from MyApp/cordova_components/www/ to
> MyApp
> > > > for obvious reasons.
> > > >
> > > > Basically, this would allow adding cordova to an existing project, as
> > > > opposed to creating a new cordova workspace.  It also plays nicer
> will
> > > all
> > > > the other tools.
> > > >
> > > > -Michal
> > > >
> > > >
> > > > On Mon, Jul 7, 2014 at 10:41 AM, Lisa Seacat DeLuca <
> ldeluca@us.ibm.com>
> > > > wrote:
> > > >
> > > > > I wanted to start a discussion on this dev list about potentially
> > > > > adding a config setting for the CLI that defines the directory
> > > > > structure to use for creating and building cordova projects.  There
> > > > > are many products that are built on top of Cordova that have
> different
> > > > > directory structures than Cordova.  This can be scary to the
> product
> > > > > teams when it comes to migration as there is no guarantee that the
> > > > > directory structure for Cordova isn't going to drastically change.
> > > > >
> > > > > Is anyone aware of any semantic issues that would cause problems
by
> > > > > creating the proposed config setting?
> > > > >
> > > > >
> > > > > Lisa
> > > > >
> > > > > Lisa Seacat DeLuca
> > > > > Mobile Engineer | t: +415.787.4589 | *ldeluca@apache.org*
> > > > > <ldeluca@apache.org> | | *ldeluca@us.ibm.com* <ldeluca@us.ibm.com>
> |
> > > > > *lisaseacat.com* <http://www.lisaseacat.com/> | [image: follow
> > > > > @LisaSeacat on twitter] <http://www.twitter.com/LisaSeacat>|
> [image:
> > > > > follow Lisa Seacat DeLuca on linkedin]
> > > > > <http://www.linkedin.com/in/lisaseacat>
> > > >
> > >
>

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