You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Sergey Grebnov (Akvelon)" <v-...@microsoft.com> on 2014/08/10 18:39:21 UTC

RE: Directory Structure - CLI directory config proposal

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 <go...@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 <ag...@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 <ld...@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*
> > > > <ld...@apache.org> | | *ldeluca@us.ibm.com* <ld...@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>
> > >
> >

RE: Directory Structure - CLI directory config proposal

Posted by "Treggiari, Leo" <le...@intel.com>.
Sounds like there is a 3rd use case for a configurable directory structure?:

1 - Allow the user to define the directory structure and have all tools honor it.  Maybe because it allows them to more easily use additional tools with Cordova CLI.
2 - A tool needs to impose a particular directory structure but wants to be able to use Cordova functionality without modifying it.
3 - Cordova CLI wants to change THEIR directory structure.

I haven't personally experienced the pain of #3 but I can well imagine it.  If the Cordova CLI team can't promise to never change the directory structure again, then this is a good reason!

Leo

-----Original Message-----
From: Victor Sosa [mailto:sosah.victor@gmail.com] 
Sent: Thursday, August 28, 2014 9:42 AM
To: dev@cordova.apache.org
Subject: Re: Directory Structure - CLI directory config proposal

>Are users actually using IBM
>Worklight IDE interchangeably with cordova-cli tool?

I'd like to take this question to show off the Cordova tools we've built in
RAD (sorry for being so pretentious)
http://www.ibm.com/developerworks/rational/library/hybrid-mobile-applications-rational-application-developer/index.html

Quick summary about the directory within the IDE: We respect it as it is so
it can be loaded onto other IDEs as well. You can tell how hard it is to
maintain a project structure that constantly changes. If there could be a
way to standardize the filesystem structure, that will help IDEs a lot


2014-08-28 11:31 GMT-05:00 Carlos Santana <cs...@gmail.com>:

> >Are users actually using IBM
> >Worklight IDE interchangeably with cordova-cli tool?  If so, could the
> >answer just be to ship a worklight-cli?
>
> We already have a worklight-cli [1], but current implementation assumes a
> proprietary directory structure for hybrid apps.
>
> Going forward I would like to see our IBM platform adopt the cordova cli
> directory structure since a lot of tools already using it, and allow
> Worklight customers to use any cordova base tool like ionic, cca, phonegap,
> etc.. and just add the worklight plugin into it and continue using their
> tool of choice.
>
> If there are tooling features specific to worklight I will add thru plugin
> hooks or enhance the worklight-cli to also support the cordova project
> structure
>
> [1]:
>
> http://www-01.ibm.com/support/knowledgecenter/api/content/SSZH4A_6.2.0/com.ibm.worklight.dev.doc/dev/c_wl_cli_features.html?locale=en
>
>
>
>
> On Wed, Aug 27, 2014 at 8:10 PM, Treggiari, Leo <le...@intel.com>
> wrote:
>
> > > This would mean that you are either 100% cordova-cli directory
> structure
> > > compatible, and thus (potentially, at least) tool-interchangeable, or
> > your
> > > have a different structure and are not interchangeable.
> > >
> > > Does that not map to user expectations?
> >
> > Interesting question.  So there seems to be two possible use cases for
> the
> > configurable directory structure:
> >
> > 1.  Allow the user to define the directory structure and have all tools
> > honor it.  I found your earlier example interesting as well:
> > > > > 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/
> > Maybe configurable directories help support this?  I would hope so.  If
> > not, then maybe they aren't that useful from a user's perspective.
> > This is part of a larger discussion that I would like to see discussed at
> > some point.  That is, when you want to combine different tooling
> > technologies into the hybrid app development workflow, which tool is in
> > charge of what?  It seems as if Cordova-cli / cordova-lib must be in
> charge
> > of the plugin selection and the build.  To be in charge of the build it
> > needs to know everything that has to do with the build - metadata
> targeted
> > for platform specific manifest files, icons, splash screens, all of the
> > plugin code, all of the application's JavaScript code, all of the
> > JavaScript libraries being used by the app (I guess these just look like
> > application JavaScript code now, and maybe that is how it should be), any
> > other native binaries, etc.  Another tool could be used for managing
> > "components" - e.g. bower/npm.  Another tool for generating applications
> > (boilerplate, workflow tasks, etc.) - e.g. yo.  Another tool for
> > application emulation - e.g.  Ripple.  What do these tools need to know
> > about each other to work well together?  These tools tend to have their
> own
> > metadata.  Do some tools need to know about each other's metadata?  An
> IDE
> > tends to want to tie these all together and would like to have
> well-defined
> > metadata and no duplication of information - e.g. what metadata holds the
> > true list of plugins used by this app?  I certainly don't know the
> answers
> > here.
> >
> > 2.  A tool needs to impose a particular directory structure but wants to
> > be able to use Cordova functionality without modifying it.  Maybe your
> > suggestion is sufficient for that:
> > > If cordova-lib just stopped containing hardcoded paths, and all modules
> > > required paths as inputs, then cordova-cli would have one pre-defined
> > > expected directory structure (not configurable), exactly as it is now.
> > But
> > > if you want to build a downstream IDE/tool with a different structure,
> > you
> > > just pass those values when making calls to cordova-lib.
> >
> > Leo
> >
> > -----Original Message-----
> > From: mmocny@google.com [mailto:mmocny@google.com] On Behalf Of Michal
> > Mocny
> > Sent: Wednesday, August 27, 2014 2:02 PM
> > To: dev
> > Subject: Re: Directory Structure - CLI directory config proposal
> >
> > Hmm, maybe we don't actually need these to be configurable.
> >
> > If cordova-lib just stopped containing hardcoded paths, and all modules
> > required paths as inputs, then cordova-cli would have one pre-defined
> > expected directory structure (not configurable), exactly as it is now.
> But
> > if you want to build a downstream IDE/tool with a different structure,
> you
> > just pass those values when making calls to cordova-lib.
> >
> > This would mean that you are either 100% cordova-cli directory structure
> > compatible, and thus (potentially, at least) tool-interchangeable, or
> your
> > have a different structure and are not interchangeable.
> >
> > Does that not map to user expectations?  Are users actually using IBM
> > Worklight IDE interchangeably with cordova-cli tool?  If so, could the
> > answer just be to ship a worklight-cli?
> >
> > -Michal
> >
> >
> > On Tue, Aug 26, 2014 at 2:55 PM, Treggiari, Leo <leo.treggiari@intel.com
> >
> > wrote:
> >
> > > I was reacting to this in your e-mail:
> > >
> > > > The user may choose to check in the user specific config if the
> entire
> > > team decides to use that as a project structure. They would not check
> the
> > > user-config in cases where individual users use different IDEs.
> > >
> > > There should be one directory structure defined for the project.  That
> > > metadata is under source code control as well as the sources that are
> > > actually using that directory structure.  Ideally, Cordova CLI and all
> > IDEs
> > > use the checked in directory structure.  If an IDE can't handle that,
> > then
> > > it would need to change the metadata, and rearrange the project
> sources,
> > > and, of course, not check in those modifications.  So the use of
> multiple
> > > IDEs and Cordova CLI will work when they all respect the directory
> > > metadata, specifically for the directories that are under source code
> > > control.  An IDE could do whatever it wants in temporary/working
> > > directories.
> > >
> > > > I could volunteer to take the first stab at that API that cordova-lib
> > > suggests. Does that sound good ?
> > >
> > > Definitely!
> > >
> > > Thanks,
> > > Leo
> > >
> > > -----Original Message-----
> > > From: Parashuram Narasimhan (MS OPEN TECH) [mailto:
> > panarasi@microsoft.com]
> > > Sent: Tuesday, August 26, 2014 11:40 AM
> > > To: dev@cordova.apache.org
> > > Subject: RE: Directory Structure - CLI directory config proposal
> > >
> > > It is the latter. The idea is that there is a default directory
> structure
> > > that shall be defined by Cordova CLI, and the IDE can modify it, call
> > tasks
> > > like prepare or compile directly from cordova-lib. The IDE could do
> > clever
> > > things like copy only modified files, use symlinks, etc. From the
> > hangouts
> > > discussion, it was agree that cordova-lib would expose APIs that shall
> be
> > > used by build systems, IDEs and the CLI. We need to finalize on that
> API.
> > >
> > > I could volunteer to take the first stab at that API that cordova-lib
> > > suggests. Does that sound good ?
> > >
> > > -----Original Message-----
> > > From: Treggiari, Leo [mailto:leo.treggiari@intel.com]
> > > Sent: Thursday, August 21, 2014 6:45 AM
> > > To: dev@cordova.apache.org
> > > Subject: RE: Directory Structure - CLI directory config proposal
> > >
> > > Is the flexible directory structure being proposed so that the CLI can
> > > "conform" to a directory structure defined by the IDE, or so that a
> user
> > > can define the directory structure and both the CLI and the IDE use it?
> > > I'm an IDE developer, but I don't have a lot a sympathy for the former.
> > > The latter is useful.  I don't understand why an IDE should think IT
> > > defines the directory structure, just like the CLI did prior to this
> > > proposal.
> > >
> > > Leo
> > >
> > > -----Original Message-----
> > > From: Parashuram Narasimhan (MS OPEN TECH) [mailto:
> > panarasi@microsoft.com]
> > > Sent: Wednesday, August 20, 2014 10:17 PM
> > > To: dev@cordova.apache.org
> > > Subject: RE: Directory Structure - CLI directory config proposal
> > >
> > > Should the platform/plugin save/restore take care of the ability to
> > > restore platforms? That way, though the platforms folder is
> discernable,
> > we
> > > do not have to necessarily delete it. The goal of able to re-create a
> > > project solely based on the checked-in information still stays.
> > >
> > > The user may choose to check in the user specific config if the entire
> > > team decides to use that as a project structure. They would not check
> the
> > > user-config in cases where individual users use different IDEs.
> > >
> > > -----Original Message-----
> > > From: Marcel Kinard [mailto:cmarcelk@gmail.com]
> > > Sent: Tuesday, August 19, 2014 12:50 PM
> > > To: dev@cordova.apache.org
> > > Subject: Re: Directory Structure - CLI directory config proposal
> > >
> > > I don't want to dramatically increase the scope of this thread, but I'm
> > > wondering if this is the opportunity to get the platforms dir to be
> 100%
> > > generated and discardable between app builds. The goal being that then
> > > there is a clean line of what devs should check into SCM and what is in
> > > their .gitignore file.
> > >
> > > It also feels like there should be a slight difference between
> > > user-specific config that doesn't go into a team SCM (my copy of
> > > cordova-android is in /home/marcelk/customized), and project-specific
> > > config that does go into a team SCM (the layout of this meta config
> that
> > > describes where the project dirs are).
> > >
> > > And yes, it should be 100% compatible with today's directory structure.
> > >
> >
>
>
>
> --
> Carlos Santana
> <cs...@gmail.com>
>



-- 
Victor Adrian Sosa Herrera
IBM Software Engineer
Guadalajara, Jalisco

Re: Directory Structure - CLI directory config proposal

Posted by Victor Sosa <so...@gmail.com>.
>Are users actually using IBM
>Worklight IDE interchangeably with cordova-cli tool?

I'd like to take this question to show off the Cordova tools we've built in
RAD (sorry for being so pretentious)
http://www.ibm.com/developerworks/rational/library/hybrid-mobile-applications-rational-application-developer/index.html

Quick summary about the directory within the IDE: We respect it as it is so
it can be loaded onto other IDEs as well. You can tell how hard it is to
maintain a project structure that constantly changes. If there could be a
way to standardize the filesystem structure, that will help IDEs a lot


2014-08-28 11:31 GMT-05:00 Carlos Santana <cs...@gmail.com>:

> >Are users actually using IBM
> >Worklight IDE interchangeably with cordova-cli tool?  If so, could the
> >answer just be to ship a worklight-cli?
>
> We already have a worklight-cli [1], but current implementation assumes a
> proprietary directory structure for hybrid apps.
>
> Going forward I would like to see our IBM platform adopt the cordova cli
> directory structure since a lot of tools already using it, and allow
> Worklight customers to use any cordova base tool like ionic, cca, phonegap,
> etc.. and just add the worklight plugin into it and continue using their
> tool of choice.
>
> If there are tooling features specific to worklight I will add thru plugin
> hooks or enhance the worklight-cli to also support the cordova project
> structure
>
> [1]:
>
> http://www-01.ibm.com/support/knowledgecenter/api/content/SSZH4A_6.2.0/com.ibm.worklight.dev.doc/dev/c_wl_cli_features.html?locale=en
>
>
>
>
> On Wed, Aug 27, 2014 at 8:10 PM, Treggiari, Leo <le...@intel.com>
> wrote:
>
> > > This would mean that you are either 100% cordova-cli directory
> structure
> > > compatible, and thus (potentially, at least) tool-interchangeable, or
> > your
> > > have a different structure and are not interchangeable.
> > >
> > > Does that not map to user expectations?
> >
> > Interesting question.  So there seems to be two possible use cases for
> the
> > configurable directory structure:
> >
> > 1.  Allow the user to define the directory structure and have all tools
> > honor it.  I found your earlier example interesting as well:
> > > > > 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/
> > Maybe configurable directories help support this?  I would hope so.  If
> > not, then maybe they aren't that useful from a user's perspective.
> > This is part of a larger discussion that I would like to see discussed at
> > some point.  That is, when you want to combine different tooling
> > technologies into the hybrid app development workflow, which tool is in
> > charge of what?  It seems as if Cordova-cli / cordova-lib must be in
> charge
> > of the plugin selection and the build.  To be in charge of the build it
> > needs to know everything that has to do with the build - metadata
> targeted
> > for platform specific manifest files, icons, splash screens, all of the
> > plugin code, all of the application's JavaScript code, all of the
> > JavaScript libraries being used by the app (I guess these just look like
> > application JavaScript code now, and maybe that is how it should be), any
> > other native binaries, etc.  Another tool could be used for managing
> > "components" - e.g. bower/npm.  Another tool for generating applications
> > (boilerplate, workflow tasks, etc.) - e.g. yo.  Another tool for
> > application emulation - e.g.  Ripple.  What do these tools need to know
> > about each other to work well together?  These tools tend to have their
> own
> > metadata.  Do some tools need to know about each other's metadata?  An
> IDE
> > tends to want to tie these all together and would like to have
> well-defined
> > metadata and no duplication of information - e.g. what metadata holds the
> > true list of plugins used by this app?  I certainly don't know the
> answers
> > here.
> >
> > 2.  A tool needs to impose a particular directory structure but wants to
> > be able to use Cordova functionality without modifying it.  Maybe your
> > suggestion is sufficient for that:
> > > If cordova-lib just stopped containing hardcoded paths, and all modules
> > > required paths as inputs, then cordova-cli would have one pre-defined
> > > expected directory structure (not configurable), exactly as it is now.
> > But
> > > if you want to build a downstream IDE/tool with a different structure,
> > you
> > > just pass those values when making calls to cordova-lib.
> >
> > Leo
> >
> > -----Original Message-----
> > From: mmocny@google.com [mailto:mmocny@google.com] On Behalf Of Michal
> > Mocny
> > Sent: Wednesday, August 27, 2014 2:02 PM
> > To: dev
> > Subject: Re: Directory Structure - CLI directory config proposal
> >
> > Hmm, maybe we don't actually need these to be configurable.
> >
> > If cordova-lib just stopped containing hardcoded paths, and all modules
> > required paths as inputs, then cordova-cli would have one pre-defined
> > expected directory structure (not configurable), exactly as it is now.
> But
> > if you want to build a downstream IDE/tool with a different structure,
> you
> > just pass those values when making calls to cordova-lib.
> >
> > This would mean that you are either 100% cordova-cli directory structure
> > compatible, and thus (potentially, at least) tool-interchangeable, or
> your
> > have a different structure and are not interchangeable.
> >
> > Does that not map to user expectations?  Are users actually using IBM
> > Worklight IDE interchangeably with cordova-cli tool?  If so, could the
> > answer just be to ship a worklight-cli?
> >
> > -Michal
> >
> >
> > On Tue, Aug 26, 2014 at 2:55 PM, Treggiari, Leo <leo.treggiari@intel.com
> >
> > wrote:
> >
> > > I was reacting to this in your e-mail:
> > >
> > > > The user may choose to check in the user specific config if the
> entire
> > > team decides to use that as a project structure. They would not check
> the
> > > user-config in cases where individual users use different IDEs.
> > >
> > > There should be one directory structure defined for the project.  That
> > > metadata is under source code control as well as the sources that are
> > > actually using that directory structure.  Ideally, Cordova CLI and all
> > IDEs
> > > use the checked in directory structure.  If an IDE can't handle that,
> > then
> > > it would need to change the metadata, and rearrange the project
> sources,
> > > and, of course, not check in those modifications.  So the use of
> multiple
> > > IDEs and Cordova CLI will work when they all respect the directory
> > > metadata, specifically for the directories that are under source code
> > > control.  An IDE could do whatever it wants in temporary/working
> > > directories.
> > >
> > > > I could volunteer to take the first stab at that API that cordova-lib
> > > suggests. Does that sound good ?
> > >
> > > Definitely!
> > >
> > > Thanks,
> > > Leo
> > >
> > > -----Original Message-----
> > > From: Parashuram Narasimhan (MS OPEN TECH) [mailto:
> > panarasi@microsoft.com]
> > > Sent: Tuesday, August 26, 2014 11:40 AM
> > > To: dev@cordova.apache.org
> > > Subject: RE: Directory Structure - CLI directory config proposal
> > >
> > > It is the latter. The idea is that there is a default directory
> structure
> > > that shall be defined by Cordova CLI, and the IDE can modify it, call
> > tasks
> > > like prepare or compile directly from cordova-lib. The IDE could do
> > clever
> > > things like copy only modified files, use symlinks, etc. From the
> > hangouts
> > > discussion, it was agree that cordova-lib would expose APIs that shall
> be
> > > used by build systems, IDEs and the CLI. We need to finalize on that
> API.
> > >
> > > I could volunteer to take the first stab at that API that cordova-lib
> > > suggests. Does that sound good ?
> > >
> > > -----Original Message-----
> > > From: Treggiari, Leo [mailto:leo.treggiari@intel.com]
> > > Sent: Thursday, August 21, 2014 6:45 AM
> > > To: dev@cordova.apache.org
> > > Subject: RE: Directory Structure - CLI directory config proposal
> > >
> > > Is the flexible directory structure being proposed so that the CLI can
> > > "conform" to a directory structure defined by the IDE, or so that a
> user
> > > can define the directory structure and both the CLI and the IDE use it?
> > > I'm an IDE developer, but I don't have a lot a sympathy for the former.
> > > The latter is useful.  I don't understand why an IDE should think IT
> > > defines the directory structure, just like the CLI did prior to this
> > > proposal.
> > >
> > > Leo
> > >
> > > -----Original Message-----
> > > From: Parashuram Narasimhan (MS OPEN TECH) [mailto:
> > panarasi@microsoft.com]
> > > Sent: Wednesday, August 20, 2014 10:17 PM
> > > To: dev@cordova.apache.org
> > > Subject: RE: Directory Structure - CLI directory config proposal
> > >
> > > Should the platform/plugin save/restore take care of the ability to
> > > restore platforms? That way, though the platforms folder is
> discernable,
> > we
> > > do not have to necessarily delete it. The goal of able to re-create a
> > > project solely based on the checked-in information still stays.
> > >
> > > The user may choose to check in the user specific config if the entire
> > > team decides to use that as a project structure. They would not check
> the
> > > user-config in cases where individual users use different IDEs.
> > >
> > > -----Original Message-----
> > > From: Marcel Kinard [mailto:cmarcelk@gmail.com]
> > > Sent: Tuesday, August 19, 2014 12:50 PM
> > > To: dev@cordova.apache.org
> > > Subject: Re: Directory Structure - CLI directory config proposal
> > >
> > > I don't want to dramatically increase the scope of this thread, but I'm
> > > wondering if this is the opportunity to get the platforms dir to be
> 100%
> > > generated and discardable between app builds. The goal being that then
> > > there is a clean line of what devs should check into SCM and what is in
> > > their .gitignore file.
> > >
> > > It also feels like there should be a slight difference between
> > > user-specific config that doesn't go into a team SCM (my copy of
> > > cordova-android is in /home/marcelk/customized), and project-specific
> > > config that does go into a team SCM (the layout of this meta config
> that
> > > describes where the project dirs are).
> > >
> > > And yes, it should be 100% compatible with today's directory structure.
> > >
> >
>
>
>
> --
> Carlos Santana
> <cs...@gmail.com>
>



-- 
Victor Adrian Sosa Herrera
IBM Software Engineer
Guadalajara, Jalisco

Re: Directory Structure - CLI directory config proposal

Posted by Carlos Santana <cs...@gmail.com>.
>Are users actually using IBM
>Worklight IDE interchangeably with cordova-cli tool?  If so, could the
>answer just be to ship a worklight-cli?

We already have a worklight-cli [1], but current implementation assumes a
proprietary directory structure for hybrid apps.

Going forward I would like to see our IBM platform adopt the cordova cli
directory structure since a lot of tools already using it, and allow
Worklight customers to use any cordova base tool like ionic, cca, phonegap,
etc.. and just add the worklight plugin into it and continue using their
tool of choice.

If there are tooling features specific to worklight I will add thru plugin
hooks or enhance the worklight-cli to also support the cordova project
structure

[1]:
http://www-01.ibm.com/support/knowledgecenter/api/content/SSZH4A_6.2.0/com.ibm.worklight.dev.doc/dev/c_wl_cli_features.html?locale=en




On Wed, Aug 27, 2014 at 8:10 PM, Treggiari, Leo <le...@intel.com>
wrote:

> > This would mean that you are either 100% cordova-cli directory structure
> > compatible, and thus (potentially, at least) tool-interchangeable, or
> your
> > have a different structure and are not interchangeable.
> >
> > Does that not map to user expectations?
>
> Interesting question.  So there seems to be two possible use cases for the
> configurable directory structure:
>
> 1.  Allow the user to define the directory structure and have all tools
> honor it.  I found your earlier example interesting as well:
> > > > 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/
> Maybe configurable directories help support this?  I would hope so.  If
> not, then maybe they aren't that useful from a user's perspective.
> This is part of a larger discussion that I would like to see discussed at
> some point.  That is, when you want to combine different tooling
> technologies into the hybrid app development workflow, which tool is in
> charge of what?  It seems as if Cordova-cli / cordova-lib must be in charge
> of the plugin selection and the build.  To be in charge of the build it
> needs to know everything that has to do with the build - metadata targeted
> for platform specific manifest files, icons, splash screens, all of the
> plugin code, all of the application's JavaScript code, all of the
> JavaScript libraries being used by the app (I guess these just look like
> application JavaScript code now, and maybe that is how it should be), any
> other native binaries, etc.  Another tool could be used for managing
> "components" - e.g. bower/npm.  Another tool for generating applications
> (boilerplate, workflow tasks, etc.) - e.g. yo.  Another tool for
> application emulation - e.g.  Ripple.  What do these tools need to know
> about each other to work well together?  These tools tend to have their own
> metadata.  Do some tools need to know about each other's metadata?  An IDE
> tends to want to tie these all together and would like to have well-defined
> metadata and no duplication of information - e.g. what metadata holds the
> true list of plugins used by this app?  I certainly don't know the answers
> here.
>
> 2.  A tool needs to impose a particular directory structure but wants to
> be able to use Cordova functionality without modifying it.  Maybe your
> suggestion is sufficient for that:
> > If cordova-lib just stopped containing hardcoded paths, and all modules
> > required paths as inputs, then cordova-cli would have one pre-defined
> > expected directory structure (not configurable), exactly as it is now.
> But
> > if you want to build a downstream IDE/tool with a different structure,
> you
> > just pass those values when making calls to cordova-lib.
>
> Leo
>
> -----Original Message-----
> From: mmocny@google.com [mailto:mmocny@google.com] On Behalf Of Michal
> Mocny
> Sent: Wednesday, August 27, 2014 2:02 PM
> To: dev
> Subject: Re: Directory Structure - CLI directory config proposal
>
> Hmm, maybe we don't actually need these to be configurable.
>
> If cordova-lib just stopped containing hardcoded paths, and all modules
> required paths as inputs, then cordova-cli would have one pre-defined
> expected directory structure (not configurable), exactly as it is now.  But
> if you want to build a downstream IDE/tool with a different structure, you
> just pass those values when making calls to cordova-lib.
>
> This would mean that you are either 100% cordova-cli directory structure
> compatible, and thus (potentially, at least) tool-interchangeable, or your
> have a different structure and are not interchangeable.
>
> Does that not map to user expectations?  Are users actually using IBM
> Worklight IDE interchangeably with cordova-cli tool?  If so, could the
> answer just be to ship a worklight-cli?
>
> -Michal
>
>
> On Tue, Aug 26, 2014 at 2:55 PM, Treggiari, Leo <le...@intel.com>
> wrote:
>
> > I was reacting to this in your e-mail:
> >
> > > The user may choose to check in the user specific config if the entire
> > team decides to use that as a project structure. They would not check the
> > user-config in cases where individual users use different IDEs.
> >
> > There should be one directory structure defined for the project.  That
> > metadata is under source code control as well as the sources that are
> > actually using that directory structure.  Ideally, Cordova CLI and all
> IDEs
> > use the checked in directory structure.  If an IDE can't handle that,
> then
> > it would need to change the metadata, and rearrange the project sources,
> > and, of course, not check in those modifications.  So the use of multiple
> > IDEs and Cordova CLI will work when they all respect the directory
> > metadata, specifically for the directories that are under source code
> > control.  An IDE could do whatever it wants in temporary/working
> > directories.
> >
> > > I could volunteer to take the first stab at that API that cordova-lib
> > suggests. Does that sound good ?
> >
> > Definitely!
> >
> > Thanks,
> > Leo
> >
> > -----Original Message-----
> > From: Parashuram Narasimhan (MS OPEN TECH) [mailto:
> panarasi@microsoft.com]
> > Sent: Tuesday, August 26, 2014 11:40 AM
> > To: dev@cordova.apache.org
> > Subject: RE: Directory Structure - CLI directory config proposal
> >
> > It is the latter. The idea is that there is a default directory structure
> > that shall be defined by Cordova CLI, and the IDE can modify it, call
> tasks
> > like prepare or compile directly from cordova-lib. The IDE could do
> clever
> > things like copy only modified files, use symlinks, etc. From the
> hangouts
> > discussion, it was agree that cordova-lib would expose APIs that shall be
> > used by build systems, IDEs and the CLI. We need to finalize on that API.
> >
> > I could volunteer to take the first stab at that API that cordova-lib
> > suggests. Does that sound good ?
> >
> > -----Original Message-----
> > From: Treggiari, Leo [mailto:leo.treggiari@intel.com]
> > Sent: Thursday, August 21, 2014 6:45 AM
> > To: dev@cordova.apache.org
> > Subject: RE: Directory Structure - CLI directory config proposal
> >
> > Is the flexible directory structure being proposed so that the CLI can
> > "conform" to a directory structure defined by the IDE, or so that a user
> > can define the directory structure and both the CLI and the IDE use it?
> > I'm an IDE developer, but I don't have a lot a sympathy for the former.
> > The latter is useful.  I don't understand why an IDE should think IT
> > defines the directory structure, just like the CLI did prior to this
> > proposal.
> >
> > Leo
> >
> > -----Original Message-----
> > From: Parashuram Narasimhan (MS OPEN TECH) [mailto:
> panarasi@microsoft.com]
> > Sent: Wednesday, August 20, 2014 10:17 PM
> > To: dev@cordova.apache.org
> > Subject: RE: Directory Structure - CLI directory config proposal
> >
> > Should the platform/plugin save/restore take care of the ability to
> > restore platforms? That way, though the platforms folder is discernable,
> we
> > do not have to necessarily delete it. The goal of able to re-create a
> > project solely based on the checked-in information still stays.
> >
> > The user may choose to check in the user specific config if the entire
> > team decides to use that as a project structure. They would not check the
> > user-config in cases where individual users use different IDEs.
> >
> > -----Original Message-----
> > From: Marcel Kinard [mailto:cmarcelk@gmail.com]
> > Sent: Tuesday, August 19, 2014 12:50 PM
> > To: dev@cordova.apache.org
> > Subject: Re: Directory Structure - CLI directory config proposal
> >
> > I don't want to dramatically increase the scope of this thread, but I'm
> > wondering if this is the opportunity to get the platforms dir to be 100%
> > generated and discardable between app builds. The goal being that then
> > there is a clean line of what devs should check into SCM and what is in
> > their .gitignore file.
> >
> > It also feels like there should be a slight difference between
> > user-specific config that doesn't go into a team SCM (my copy of
> > cordova-android is in /home/marcelk/customized), and project-specific
> > config that does go into a team SCM (the layout of this meta config that
> > describes where the project dirs are).
> >
> > And yes, it should be 100% compatible with today's directory structure.
> >
>



-- 
Carlos Santana
<cs...@gmail.com>

RE: Directory Structure - CLI directory config proposal

Posted by "Treggiari, Leo" <le...@intel.com>.
> This would mean that you are either 100% cordova-cli directory structure
> compatible, and thus (potentially, at least) tool-interchangeable, or your
> have a different structure and are not interchangeable.
>
> Does that not map to user expectations?

Interesting question.  So there seems to be two possible use cases for the configurable directory structure:

1.  Allow the user to define the directory structure and have all tools honor it.  I found your earlier example interesting as well:
> > > 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/
Maybe configurable directories help support this?  I would hope so.  If not, then maybe they aren't that useful from a user's perspective.
This is part of a larger discussion that I would like to see discussed at some point.  That is, when you want to combine different tooling technologies into the hybrid app development workflow, which tool is in charge of what?  It seems as if Cordova-cli / cordova-lib must be in charge of the plugin selection and the build.  To be in charge of the build it needs to know everything that has to do with the build - metadata targeted for platform specific manifest files, icons, splash screens, all of the plugin code, all of the application's JavaScript code, all of the JavaScript libraries being used by the app (I guess these just look like application JavaScript code now, and maybe that is how it should be), any other native binaries, etc.  Another tool could be used for managing "components" - e.g. bower/npm.  Another tool for generating applications (boilerplate, workflow tasks, etc.) - e.g. yo.  Another tool for application emulation - e.g.  Ripple.  What do these tools need to know about each other to work well together?  These tools tend to have their own metadata.  Do some tools need to know about each other's metadata?  An IDE tends to want to tie these all together and would like to have well-defined metadata and no duplication of information - e.g. what metadata holds the true list of plugins used by this app?  I certainly don't know the answers here.

2.  A tool needs to impose a particular directory structure but wants to be able to use Cordova functionality without modifying it.  Maybe your suggestion is sufficient for that:
> If cordova-lib just stopped containing hardcoded paths, and all modules
> required paths as inputs, then cordova-cli would have one pre-defined
> expected directory structure (not configurable), exactly as it is now.  But
> if you want to build a downstream IDE/tool with a different structure, you
> just pass those values when making calls to cordova-lib.

Leo

-----Original Message-----
From: mmocny@google.com [mailto:mmocny@google.com] On Behalf Of Michal Mocny
Sent: Wednesday, August 27, 2014 2:02 PM
To: dev
Subject: Re: Directory Structure - CLI directory config proposal

Hmm, maybe we don't actually need these to be configurable.

If cordova-lib just stopped containing hardcoded paths, and all modules
required paths as inputs, then cordova-cli would have one pre-defined
expected directory structure (not configurable), exactly as it is now.  But
if you want to build a downstream IDE/tool with a different structure, you
just pass those values when making calls to cordova-lib.

This would mean that you are either 100% cordova-cli directory structure
compatible, and thus (potentially, at least) tool-interchangeable, or your
have a different structure and are not interchangeable.

Does that not map to user expectations?  Are users actually using IBM
Worklight IDE interchangeably with cordova-cli tool?  If so, could the
answer just be to ship a worklight-cli?

-Michal


On Tue, Aug 26, 2014 at 2:55 PM, Treggiari, Leo <le...@intel.com>
wrote:

> I was reacting to this in your e-mail:
>
> > The user may choose to check in the user specific config if the entire
> team decides to use that as a project structure. They would not check the
> user-config in cases where individual users use different IDEs.
>
> There should be one directory structure defined for the project.  That
> metadata is under source code control as well as the sources that are
> actually using that directory structure.  Ideally, Cordova CLI and all IDEs
> use the checked in directory structure.  If an IDE can't handle that, then
> it would need to change the metadata, and rearrange the project sources,
> and, of course, not check in those modifications.  So the use of multiple
> IDEs and Cordova CLI will work when they all respect the directory
> metadata, specifically for the directories that are under source code
> control.  An IDE could do whatever it wants in temporary/working
> directories.
>
> > I could volunteer to take the first stab at that API that cordova-lib
> suggests. Does that sound good ?
>
> Definitely!
>
> Thanks,
> Leo
>
> -----Original Message-----
> From: Parashuram Narasimhan (MS OPEN TECH) [mailto:panarasi@microsoft.com]
> Sent: Tuesday, August 26, 2014 11:40 AM
> To: dev@cordova.apache.org
> Subject: RE: Directory Structure - CLI directory config proposal
>
> It is the latter. The idea is that there is a default directory structure
> that shall be defined by Cordova CLI, and the IDE can modify it, call tasks
> like prepare or compile directly from cordova-lib. The IDE could do clever
> things like copy only modified files, use symlinks, etc. From the hangouts
> discussion, it was agree that cordova-lib would expose APIs that shall be
> used by build systems, IDEs and the CLI. We need to finalize on that API.
>
> I could volunteer to take the first stab at that API that cordova-lib
> suggests. Does that sound good ?
>
> -----Original Message-----
> From: Treggiari, Leo [mailto:leo.treggiari@intel.com]
> Sent: Thursday, August 21, 2014 6:45 AM
> To: dev@cordova.apache.org
> Subject: RE: Directory Structure - CLI directory config proposal
>
> Is the flexible directory structure being proposed so that the CLI can
> "conform" to a directory structure defined by the IDE, or so that a user
> can define the directory structure and both the CLI and the IDE use it?
> I'm an IDE developer, but I don't have a lot a sympathy for the former.
> The latter is useful.  I don't understand why an IDE should think IT
> defines the directory structure, just like the CLI did prior to this
> proposal.
>
> Leo
>
> -----Original Message-----
> From: Parashuram Narasimhan (MS OPEN TECH) [mailto:panarasi@microsoft.com]
> Sent: Wednesday, August 20, 2014 10:17 PM
> To: dev@cordova.apache.org
> Subject: RE: Directory Structure - CLI directory config proposal
>
> Should the platform/plugin save/restore take care of the ability to
> restore platforms? That way, though the platforms folder is discernable, we
> do not have to necessarily delete it. The goal of able to re-create a
> project solely based on the checked-in information still stays.
>
> The user may choose to check in the user specific config if the entire
> team decides to use that as a project structure. They would not check the
> user-config in cases where individual users use different IDEs.
>
> -----Original Message-----
> From: Marcel Kinard [mailto:cmarcelk@gmail.com]
> Sent: Tuesday, August 19, 2014 12:50 PM
> To: dev@cordova.apache.org
> Subject: Re: Directory Structure - CLI directory config proposal
>
> I don't want to dramatically increase the scope of this thread, but I'm
> wondering if this is the opportunity to get the platforms dir to be 100%
> generated and discardable between app builds. The goal being that then
> there is a clean line of what devs should check into SCM and what is in
> their .gitignore file.
>
> It also feels like there should be a slight difference between
> user-specific config that doesn't go into a team SCM (my copy of
> cordova-android is in /home/marcelk/customized), and project-specific
> config that does go into a team SCM (the layout of this meta config that
> describes where the project dirs are).
>
> And yes, it should be 100% compatible with today's directory structure.
>

Re: Directory Structure - CLI directory config proposal

Posted by Michal Mocny <mm...@chromium.org>.
Hmm, maybe we don't actually need these to be configurable.

If cordova-lib just stopped containing hardcoded paths, and all modules
required paths as inputs, then cordova-cli would have one pre-defined
expected directory structure (not configurable), exactly as it is now.  But
if you want to build a downstream IDE/tool with a different structure, you
just pass those values when making calls to cordova-lib.

This would mean that you are either 100% cordova-cli directory structure
compatible, and thus (potentially, at least) tool-interchangeable, or your
have a different structure and are not interchangeable.

Does that not map to user expectations?  Are users actually using IBM
Worklight IDE interchangeably with cordova-cli tool?  If so, could the
answer just be to ship a worklight-cli?

-Michal


On Tue, Aug 26, 2014 at 2:55 PM, Treggiari, Leo <le...@intel.com>
wrote:

> I was reacting to this in your e-mail:
>
> > The user may choose to check in the user specific config if the entire
> team decides to use that as a project structure. They would not check the
> user-config in cases where individual users use different IDEs.
>
> There should be one directory structure defined for the project.  That
> metadata is under source code control as well as the sources that are
> actually using that directory structure.  Ideally, Cordova CLI and all IDEs
> use the checked in directory structure.  If an IDE can't handle that, then
> it would need to change the metadata, and rearrange the project sources,
> and, of course, not check in those modifications.  So the use of multiple
> IDEs and Cordova CLI will work when they all respect the directory
> metadata, specifically for the directories that are under source code
> control.  An IDE could do whatever it wants in temporary/working
> directories.
>
> > I could volunteer to take the first stab at that API that cordova-lib
> suggests. Does that sound good ?
>
> Definitely!
>
> Thanks,
> Leo
>
> -----Original Message-----
> From: Parashuram Narasimhan (MS OPEN TECH) [mailto:panarasi@microsoft.com]
> Sent: Tuesday, August 26, 2014 11:40 AM
> To: dev@cordova.apache.org
> Subject: RE: Directory Structure - CLI directory config proposal
>
> It is the latter. The idea is that there is a default directory structure
> that shall be defined by Cordova CLI, and the IDE can modify it, call tasks
> like prepare or compile directly from cordova-lib. The IDE could do clever
> things like copy only modified files, use symlinks, etc. From the hangouts
> discussion, it was agree that cordova-lib would expose APIs that shall be
> used by build systems, IDEs and the CLI. We need to finalize on that API.
>
> I could volunteer to take the first stab at that API that cordova-lib
> suggests. Does that sound good ?
>
> -----Original Message-----
> From: Treggiari, Leo [mailto:leo.treggiari@intel.com]
> Sent: Thursday, August 21, 2014 6:45 AM
> To: dev@cordova.apache.org
> Subject: RE: Directory Structure - CLI directory config proposal
>
> Is the flexible directory structure being proposed so that the CLI can
> "conform" to a directory structure defined by the IDE, or so that a user
> can define the directory structure and both the CLI and the IDE use it?
> I'm an IDE developer, but I don't have a lot a sympathy for the former.
> The latter is useful.  I don't understand why an IDE should think IT
> defines the directory structure, just like the CLI did prior to this
> proposal.
>
> Leo
>
> -----Original Message-----
> From: Parashuram Narasimhan (MS OPEN TECH) [mailto:panarasi@microsoft.com]
> Sent: Wednesday, August 20, 2014 10:17 PM
> To: dev@cordova.apache.org
> Subject: RE: Directory Structure - CLI directory config proposal
>
> Should the platform/plugin save/restore take care of the ability to
> restore platforms? That way, though the platforms folder is discernable, we
> do not have to necessarily delete it. The goal of able to re-create a
> project solely based on the checked-in information still stays.
>
> The user may choose to check in the user specific config if the entire
> team decides to use that as a project structure. They would not check the
> user-config in cases where individual users use different IDEs.
>
> -----Original Message-----
> From: Marcel Kinard [mailto:cmarcelk@gmail.com]
> Sent: Tuesday, August 19, 2014 12:50 PM
> To: dev@cordova.apache.org
> Subject: Re: Directory Structure - CLI directory config proposal
>
> I don't want to dramatically increase the scope of this thread, but I'm
> wondering if this is the opportunity to get the platforms dir to be 100%
> generated and discardable between app builds. The goal being that then
> there is a clean line of what devs should check into SCM and what is in
> their .gitignore file.
>
> It also feels like there should be a slight difference between
> user-specific config that doesn't go into a team SCM (my copy of
> cordova-android is in /home/marcelk/customized), and project-specific
> config that does go into a team SCM (the layout of this meta config that
> describes where the project dirs are).
>
> And yes, it should be 100% compatible with today's directory structure.
>

RE: Directory Structure - CLI directory config proposal

Posted by "Treggiari, Leo" <le...@intel.com>.
I was reacting to this in your e-mail:

> The user may choose to check in the user specific config if the entire team decides to use that as a project structure. They would not check the user-config in cases where individual users use different IDEs.

There should be one directory structure defined for the project.  That metadata is under source code control as well as the sources that are actually using that directory structure.  Ideally, Cordova CLI and all IDEs use the checked in directory structure.  If an IDE can't handle that, then it would need to change the metadata, and rearrange the project sources, and, of course, not check in those modifications.  So the use of multiple IDEs and Cordova CLI will work when they all respect the directory metadata, specifically for the directories that are under source code control.  An IDE could do whatever it wants in temporary/working directories.

> I could volunteer to take the first stab at that API that cordova-lib suggests. Does that sound good ?

Definitely!

Thanks,
Leo

-----Original Message-----
From: Parashuram Narasimhan (MS OPEN TECH) [mailto:panarasi@microsoft.com] 
Sent: Tuesday, August 26, 2014 11:40 AM
To: dev@cordova.apache.org
Subject: RE: Directory Structure - CLI directory config proposal

It is the latter. The idea is that there is a default directory structure that shall be defined by Cordova CLI, and the IDE can modify it, call tasks like prepare or compile directly from cordova-lib. The IDE could do clever things like copy only modified files, use symlinks, etc. From the hangouts discussion, it was agree that cordova-lib would expose APIs that shall be used by build systems, IDEs and the CLI. We need to finalize on that API.

I could volunteer to take the first stab at that API that cordova-lib suggests. Does that sound good ?

-----Original Message-----
From: Treggiari, Leo [mailto:leo.treggiari@intel.com] 
Sent: Thursday, August 21, 2014 6:45 AM
To: dev@cordova.apache.org
Subject: RE: Directory Structure - CLI directory config proposal

Is the flexible directory structure being proposed so that the CLI can "conform" to a directory structure defined by the IDE, or so that a user can define the directory structure and both the CLI and the IDE use it?  I'm an IDE developer, but I don't have a lot a sympathy for the former.  The latter is useful.  I don't understand why an IDE should think IT defines the directory structure, just like the CLI did prior to this proposal.

Leo

-----Original Message-----
From: Parashuram Narasimhan (MS OPEN TECH) [mailto:panarasi@microsoft.com] 
Sent: Wednesday, August 20, 2014 10:17 PM
To: dev@cordova.apache.org
Subject: RE: Directory Structure - CLI directory config proposal

Should the platform/plugin save/restore take care of the ability to restore platforms? That way, though the platforms folder is discernable, we do not have to necessarily delete it. The goal of able to re-create a project solely based on the checked-in information still stays. 

The user may choose to check in the user specific config if the entire team decides to use that as a project structure. They would not check the user-config in cases where individual users use different IDEs. 

-----Original Message-----
From: Marcel Kinard [mailto:cmarcelk@gmail.com] 
Sent: Tuesday, August 19, 2014 12:50 PM
To: dev@cordova.apache.org
Subject: Re: Directory Structure - CLI directory config proposal

I don't want to dramatically increase the scope of this thread, but I'm wondering if this is the opportunity to get the platforms dir to be 100% generated and discardable between app builds. The goal being that then there is a clean line of what devs should check into SCM and what is in their .gitignore file.

It also feels like there should be a slight difference between user-specific config that doesn't go into a team SCM (my copy of cordova-android is in /home/marcelk/customized), and project-specific config that does go into a team SCM (the layout of this meta config that describes where the project dirs are).

And yes, it should be 100% compatible with today's directory structure.

RE: Directory Structure - CLI directory config proposal

Posted by "Parashuram Narasimhan (MS OPEN TECH)" <pa...@microsoft.com>.
It is the latter. The idea is that there is a default directory structure that shall be defined by Cordova CLI, and the IDE can modify it, call tasks like prepare or compile directly from cordova-lib. The IDE could do clever things like copy only modified files, use symlinks, etc. From the hangouts discussion, it was agree that cordova-lib would expose APIs that shall be used by build systems, IDEs and the CLI. We need to finalize on that API.

I could volunteer to take the first stab at that API that cordova-lib suggests. Does that sound good ?

-----Original Message-----
From: Treggiari, Leo [mailto:leo.treggiari@intel.com] 
Sent: Thursday, August 21, 2014 6:45 AM
To: dev@cordova.apache.org
Subject: RE: Directory Structure - CLI directory config proposal

Is the flexible directory structure being proposed so that the CLI can "conform" to a directory structure defined by the IDE, or so that a user can define the directory structure and both the CLI and the IDE use it?  I'm an IDE developer, but I don't have a lot a sympathy for the former.  The latter is useful.  I don't understand why an IDE should think IT defines the directory structure, just like the CLI did prior to this proposal.

Leo

-----Original Message-----
From: Parashuram Narasimhan (MS OPEN TECH) [mailto:panarasi@microsoft.com] 
Sent: Wednesday, August 20, 2014 10:17 PM
To: dev@cordova.apache.org
Subject: RE: Directory Structure - CLI directory config proposal

Should the platform/plugin save/restore take care of the ability to restore platforms? That way, though the platforms folder is discernable, we do not have to necessarily delete it. The goal of able to re-create a project solely based on the checked-in information still stays. 

The user may choose to check in the user specific config if the entire team decides to use that as a project structure. They would not check the user-config in cases where individual users use different IDEs. 

-----Original Message-----
From: Marcel Kinard [mailto:cmarcelk@gmail.com] 
Sent: Tuesday, August 19, 2014 12:50 PM
To: dev@cordova.apache.org
Subject: Re: Directory Structure - CLI directory config proposal

I don't want to dramatically increase the scope of this thread, but I'm wondering if this is the opportunity to get the platforms dir to be 100% generated and discardable between app builds. The goal being that then there is a clean line of what devs should check into SCM and what is in their .gitignore file.

It also feels like there should be a slight difference between user-specific config that doesn't go into a team SCM (my copy of cordova-android is in /home/marcelk/customized), and project-specific config that does go into a team SCM (the layout of this meta config that describes where the project dirs are).

And yes, it should be 100% compatible with today's directory structure.

RE: Directory Structure - CLI directory config proposal

Posted by "Treggiari, Leo" <le...@intel.com>.
Is the flexible directory structure being proposed so that the CLI can "conform" to a directory structure defined by the IDE, or so that a user can define the directory structure and both the CLI and the IDE use it?  I'm an IDE developer, but I don't have a lot a sympathy for the former.  The latter is useful.  I don't understand why an IDE should think IT defines the directory structure, just like the CLI did prior to this proposal.

Leo

-----Original Message-----
From: Parashuram Narasimhan (MS OPEN TECH) [mailto:panarasi@microsoft.com] 
Sent: Wednesday, August 20, 2014 10:17 PM
To: dev@cordova.apache.org
Subject: RE: Directory Structure - CLI directory config proposal

Should the platform/plugin save/restore take care of the ability to restore platforms? That way, though the platforms folder is discernable, we do not have to necessarily delete it. The goal of able to re-create a project solely based on the checked-in information still stays. 

The user may choose to check in the user specific config if the entire team decides to use that as a project structure. They would not check the user-config in cases where individual users use different IDEs. 

-----Original Message-----
From: Marcel Kinard [mailto:cmarcelk@gmail.com] 
Sent: Tuesday, August 19, 2014 12:50 PM
To: dev@cordova.apache.org
Subject: Re: Directory Structure - CLI directory config proposal

I don't want to dramatically increase the scope of this thread, but I'm wondering if this is the opportunity to get the platforms dir to be 100% generated and discardable between app builds. The goal being that then there is a clean line of what devs should check into SCM and what is in their .gitignore file.

It also feels like there should be a slight difference between user-specific config that doesn't go into a team SCM (my copy of cordova-android is in /home/marcelk/customized), and project-specific config that does go into a team SCM (the layout of this meta config that describes where the project dirs are).

And yes, it should be 100% compatible with today's directory structure.

RE: Directory Structure - CLI directory config proposal

Posted by "Parashuram Narasimhan (MS OPEN TECH)" <pa...@microsoft.com>.
Should the platform/plugin save/restore take care of the ability to restore platforms? That way, though the platforms folder is discernable, we do not have to necessarily delete it. The goal of able to re-create a project solely based on the checked-in information still stays. 

The user may choose to check in the user specific config if the entire team decides to use that as a project structure. They would not check the user-config in cases where individual users use different IDEs. 

-----Original Message-----
From: Marcel Kinard [mailto:cmarcelk@gmail.com] 
Sent: Tuesday, August 19, 2014 12:50 PM
To: dev@cordova.apache.org
Subject: Re: Directory Structure - CLI directory config proposal

I don't want to dramatically increase the scope of this thread, but I'm wondering if this is the opportunity to get the platforms dir to be 100% generated and discardable between app builds. The goal being that then there is a clean line of what devs should check into SCM and what is in their .gitignore file.

It also feels like there should be a slight difference between user-specific config that doesn't go into a team SCM (my copy of cordova-android is in /home/marcelk/customized), and project-specific config that does go into a team SCM (the layout of this meta config that describes where the project dirs are).

And yes, it should be 100% compatible with today's directory structure.

Re: Directory Structure - CLI directory config proposal

Posted by Marcel Kinard <cm...@gmail.com>.
I don't want to dramatically increase the scope of this thread, but I'm wondering if this is the opportunity to get the platforms dir to be 100% generated and discardable between app builds. The goal being that then there is a clean line of what devs should check into SCM and what is in their .gitignore file.

It also feels like there should be a slight difference between user-specific config that doesn't go into a team SCM (my copy of cordova-android is in /home/marcelk/customized), and project-specific config that does go into a team SCM (the layout of this meta config that describes where the project dirs are).

And yes, it should be 100% compatible with today's directory structure.

Re: Directory Structure - CLI directory config proposal

Posted by Jesse <pu...@gmail.com>.
I see the importance of the feature now, and while I haven't examined the
posted implementaion, I am now a +1 on the proposal.

I have added this to tomorrow's hangout agenda for discussion.


@purplecabbage
risingj.com


On Mon, Aug 18, 2014 at 1:29 PM, Parashuram Narasimhan (MS OPEN TECH) <
panarasi@microsoft.com> wrote:

> I think the idea of this feature is to have ZERO impact on existing
> workflows. This would be a very useful feature for IDEs who may do
> additional things like caching platforms, providing customized versions of
> platforms, etc. The implementation we have follows that philosophy. Brian,
> Jesse, it would be great if you could look at our implementation and let me
> know if your concerns are addressed.
>
> -----Original Message-----
> From: brian.leroux@gmail.com [mailto:brian.leroux@gmail.com] On Behalf Of
> Brian LeRoux
> Sent: Monday, August 11, 2014 11:06 AM
> To: dev@cordova.apache.org
> Subject: Re: Directory Structure - CLI directory config proposal
>
> I can see the value but have found configurable path look ups tend to be
> very fragile. (The more config the more variable paths create more
> opportunities for weird side effects.) I echo the sentiment that we need to
> be 100% certain this feature does not break existing (default) workflow.
>
>
> On Mon, Aug 11, 2014 at 10:44 AM, Jesse <pu...@gmail.com> wrote:
>
> > I see zero value in this feature, so I will simply ask that we please
> > don't break any expectations that already exist.
> > If this can be achieved without altering the current workflow then I
> > will keep quiet.
> >
> >
> > @purplecabbage
> > risingj.com
> >
> >
> > On Mon, Aug 11, 2014 at 10:13 AM, Carlos Santana
> > <cs...@gmail.com>
> > wrote:
> >
> > > Yep I agree with using .cordova/config.json for this directory config.
> > and
> > > it would be in 3.x should not wait for 4.x
> > >
> > >
> > >
> > > On Mon, Aug 11, 2014 at 1:07 PM, Michal Mocny <mm...@chromium.org>
> > wrote:
> > >
> > > > Lets not add a new public config file until we have many long
> > > > talks to figure out all the requirements for a future CLI.
> > > > Perhaps PGDay US
> > will
> > > be
> > > > a good opportunity to get together in person and hash out some ideas?
> > > >
> > > > And since I don't think we should block work like what is being
> > discussed
> > > > here, we should continue to use the .cordova/config.json.  We can
> > migrate
> > > > those features to a public config file without issue.
> > > >
> > > > -Michal
> > > >
> > > >
> > > > On Mon, Aug 11, 2014 at 12:49 PM, Carlos Santana
> > > > <csantana23@gmail.com
> > >
> > > > wrote:
> > > >
> > > > > I like what Mark suggested of not passing json string in the
> > > > > command
> > > > line,
> > > > > and better to pass a json file.
> > > > > Why are we talking about 4.0 release? This can be landed on 3.x
> > unless
> > > > I'm
> > > > > missing something very obvious.
> > > > >
> > > > > I would also would like to propose that we expose the hidden
> > > config.json
> > > > as
> > > > > a plublic file on the root of the project like cordova.json
> > > > > (easy to
> > > > find,
> > > > > easy to edit, easy to understand what's going on).
> > > > > Allowing the www template come with a default cordova.json with
> > default
> > > > > values, and allow downstream distributions like IBM :-), to have
> > > > > a different template for "cordova create
> > > > > --copy-from=ibmtemplate/)
> > with a
> > > > > different cordova.json
> > > > > Also cordova.json can serve as a way to identity a cordova
> > > > > project
> > root
> > > > > directory by high level IDE/Tools maybe this change of
> > > > > cordova.json is a big enough for a 4.x
> > > > >
> > > > >
> > > > >
> > > > > On Mon, Aug 11, 2014 at 11:27 AM, Parashuram Narasimhan (MS OPEN
> > TECH)
> > > <
> > > > > panarasi@microsoft.com> wrote:
> > > > >
> > > > > > Should we go ahead and create a branch in the main project so
> > > > > > that
> > > you
> > > > > can
> > > > > > also add your ideas to it? We could target this feature for a
> > > > > > 4.0
> > > > > release.
> > > > > >
> > > > > > -----Original Message-----
> > > > > > From: Mark Koudritsky [mailto:kamrik@google.com]
> > > > > > Sent: Monday, August 11, 2014 7:56 AM
> > > > > > To: dev@cordova.apache.org
> > > > > > Subject: Re: Directory Structure - CLI directory config
> > > > > > proposal
> > > > > >
> > > > > > 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-direct
> > > > orie
> > > > > > > s/
> > > > > > > [4]
> > > > > > >
> > > > https://github.com/MSOpenTech/cordova-cli/tree/configurable-direct
> > > > orie
> > > > > > > s/
> > > > > > >
> > > > > > > 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 <go...@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
> > *
> > > > > > > > > > > <ld...@apache.org> | | *ldeluca@us.ibm.com*
> > > > > > > > > > > <ld...@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>
> > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Carlos Santana
> > > > > <cs...@gmail.com>
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Carlos Santana
> > > <cs...@gmail.com>
> > >
> >
>

RE: Directory Structure - CLI directory config proposal

Posted by "Parashuram Narasimhan (MS OPEN TECH)" <pa...@microsoft.com>.
I think the idea of this feature is to have ZERO impact on existing workflows. This would be a very useful feature for IDEs who may do additional things like caching platforms, providing customized versions of platforms, etc. The implementation we have follows that philosophy. Brian, Jesse, it would be great if you could look at our implementation and let me know if your concerns are addressed. 

-----Original Message-----
From: brian.leroux@gmail.com [mailto:brian.leroux@gmail.com] On Behalf Of Brian LeRoux
Sent: Monday, August 11, 2014 11:06 AM
To: dev@cordova.apache.org
Subject: Re: Directory Structure - CLI directory config proposal

I can see the value but have found configurable path look ups tend to be very fragile. (The more config the more variable paths create more opportunities for weird side effects.) I echo the sentiment that we need to be 100% certain this feature does not break existing (default) workflow.


On Mon, Aug 11, 2014 at 10:44 AM, Jesse <pu...@gmail.com> wrote:

> I see zero value in this feature, so I will simply ask that we please 
> don't break any expectations that already exist.
> If this can be achieved without altering the current workflow then I 
> will keep quiet.
>
>
> @purplecabbage
> risingj.com
>
>
> On Mon, Aug 11, 2014 at 10:13 AM, Carlos Santana 
> <cs...@gmail.com>
> wrote:
>
> > Yep I agree with using .cordova/config.json for this directory config.
> and
> > it would be in 3.x should not wait for 4.x
> >
> >
> >
> > On Mon, Aug 11, 2014 at 1:07 PM, Michal Mocny <mm...@chromium.org>
> wrote:
> >
> > > Lets not add a new public config file until we have many long 
> > > talks to figure out all the requirements for a future CLI.  
> > > Perhaps PGDay US
> will
> > be
> > > a good opportunity to get together in person and hash out some ideas?
> > >
> > > And since I don't think we should block work like what is being
> discussed
> > > here, we should continue to use the .cordova/config.json.  We can
> migrate
> > > those features to a public config file without issue.
> > >
> > > -Michal
> > >
> > >
> > > On Mon, Aug 11, 2014 at 12:49 PM, Carlos Santana 
> > > <csantana23@gmail.com
> >
> > > wrote:
> > >
> > > > I like what Mark suggested of not passing json string in the 
> > > > command
> > > line,
> > > > and better to pass a json file.
> > > > Why are we talking about 4.0 release? This can be landed on 3.x
> unless
> > > I'm
> > > > missing something very obvious.
> > > >
> > > > I would also would like to propose that we expose the hidden
> > config.json
> > > as
> > > > a plublic file on the root of the project like cordova.json 
> > > > (easy to
> > > find,
> > > > easy to edit, easy to understand what's going on).
> > > > Allowing the www template come with a default cordova.json with
> default
> > > > values, and allow downstream distributions like IBM :-), to have 
> > > > a different template for "cordova create 
> > > > --copy-from=ibmtemplate/)
> with a
> > > > different cordova.json
> > > > Also cordova.json can serve as a way to identity a cordova 
> > > > project
> root
> > > > directory by high level IDE/Tools maybe this change of 
> > > > cordova.json is a big enough for a 4.x
> > > >
> > > >
> > > >
> > > > On Mon, Aug 11, 2014 at 11:27 AM, Parashuram Narasimhan (MS OPEN
> TECH)
> > <
> > > > panarasi@microsoft.com> wrote:
> > > >
> > > > > Should we go ahead and create a branch in the main project so 
> > > > > that
> > you
> > > > can
> > > > > also add your ideas to it? We could target this feature for a 
> > > > > 4.0
> > > > release.
> > > > >
> > > > > -----Original Message-----
> > > > > From: Mark Koudritsky [mailto:kamrik@google.com]
> > > > > Sent: Monday, August 11, 2014 7:56 AM
> > > > > To: dev@cordova.apache.org
> > > > > Subject: Re: Directory Structure - CLI directory config 
> > > > > proposal
> > > > >
> > > > > 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-direct
> > > orie
> > > > > > s/
> > > > > > [4]
> > > > > >
> > > https://github.com/MSOpenTech/cordova-cli/tree/configurable-direct
> > > orie
> > > > > > s/
> > > > > >
> > > > > > 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 <go...@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
> *
> > > > > > > > > > <ld...@apache.org> | | *ldeluca@us.ibm.com* 
> > > > > > > > > > <ld...@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>
> > > > > > > > >
> > > > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Carlos Santana
> > > > <cs...@gmail.com>
> > > >
> > >
> >
> >
> >
> > --
> > Carlos Santana
> > <cs...@gmail.com>
> >
>

Re: Directory Structure - CLI directory config proposal

Posted by Brian LeRoux <b...@brian.io>.
I can see the value but have found configurable path look ups tend to be
very fragile. (The more config the more variable paths create more
opportunities for weird side effects.) I echo the sentiment that we need to
be 100% certain this feature does not break existing (default) workflow.


On Mon, Aug 11, 2014 at 10:44 AM, Jesse <pu...@gmail.com> wrote:

> I see zero value in this feature, so I will simply ask that we please don't
> break any expectations that already exist.
> If this can be achieved without altering the current workflow then I will
> keep quiet.
>
>
> @purplecabbage
> risingj.com
>
>
> On Mon, Aug 11, 2014 at 10:13 AM, Carlos Santana <cs...@gmail.com>
> wrote:
>
> > Yep I agree with using .cordova/config.json for this directory config.
> and
> > it would be in 3.x should not wait for 4.x
> >
> >
> >
> > On Mon, Aug 11, 2014 at 1:07 PM, Michal Mocny <mm...@chromium.org>
> wrote:
> >
> > > Lets not add a new public config file until we have many long talks to
> > > figure out all the requirements for a future CLI.  Perhaps PGDay US
> will
> > be
> > > a good opportunity to get together in person and hash out some ideas?
> > >
> > > And since I don't think we should block work like what is being
> discussed
> > > here, we should continue to use the .cordova/config.json.  We can
> migrate
> > > those features to a public config file without issue.
> > >
> > > -Michal
> > >
> > >
> > > On Mon, Aug 11, 2014 at 12:49 PM, Carlos Santana <csantana23@gmail.com
> >
> > > wrote:
> > >
> > > > I like what Mark suggested of not passing json string in the command
> > > line,
> > > > and better to pass a json file.
> > > > Why are we talking about 4.0 release? This can be landed on 3.x
> unless
> > > I'm
> > > > missing something very obvious.
> > > >
> > > > I would also would like to propose that we expose the hidden
> > config.json
> > > as
> > > > a plublic file on the root of the project like cordova.json (easy to
> > > find,
> > > > easy to edit, easy to understand what's going on).
> > > > Allowing the www template come with a default cordova.json with
> default
> > > > values, and allow downstream distributions like IBM :-), to have a
> > > > different template for "cordova create --copy-from=ibmtemplate/)
> with a
> > > > different cordova.json
> > > > Also cordova.json can serve as a way to identity a cordova project
> root
> > > > directory by high level IDE/Tools
> > > > maybe this change of cordova.json is a big enough for a 4.x
> > > >
> > > >
> > > >
> > > > On Mon, Aug 11, 2014 at 11:27 AM, Parashuram Narasimhan (MS OPEN
> TECH)
> > <
> > > > panarasi@microsoft.com> wrote:
> > > >
> > > > > Should we go ahead and create a branch in the main project so that
> > you
> > > > can
> > > > > also add your ideas to it? We could target this feature for a 4.0
> > > > release.
> > > > >
> > > > > -----Original Message-----
> > > > > From: Mark Koudritsky [mailto:kamrik@google.com]
> > > > > Sent: Monday, August 11, 2014 7:56 AM
> > > > > To: dev@cordova.apache.org
> > > > > Subject: Re: Directory Structure - CLI directory config proposal
> > > > >
> > > > > 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-directorie
> > > > > > s/
> > > > > > [4]
> > > > > >
> > > https://github.com/MSOpenTech/cordova-cli/tree/configurable-directorie
> > > > > > s/
> > > > > >
> > > > > > 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 <go...@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
> *
> > > > > > > > > > <ld...@apache.org> | | *ldeluca@us.ibm.com*
> > > > > > > > > > <ld...@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>
> > > > > > > > >
> > > > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Carlos Santana
> > > > <cs...@gmail.com>
> > > >
> > >
> >
> >
> >
> > --
> > Carlos Santana
> > <cs...@gmail.com>
> >
>

Re: Directory Structure - CLI directory config proposal

Posted by Jesse <pu...@gmail.com>.
I see zero value in this feature, so I will simply ask that we please don't
break any expectations that already exist.
If this can be achieved without altering the current workflow then I will
keep quiet.


@purplecabbage
risingj.com


On Mon, Aug 11, 2014 at 10:13 AM, Carlos Santana <cs...@gmail.com>
wrote:

> Yep I agree with using .cordova/config.json for this directory config. and
> it would be in 3.x should not wait for 4.x
>
>
>
> On Mon, Aug 11, 2014 at 1:07 PM, Michal Mocny <mm...@chromium.org> wrote:
>
> > Lets not add a new public config file until we have many long talks to
> > figure out all the requirements for a future CLI.  Perhaps PGDay US will
> be
> > a good opportunity to get together in person and hash out some ideas?
> >
> > And since I don't think we should block work like what is being discussed
> > here, we should continue to use the .cordova/config.json.  We can migrate
> > those features to a public config file without issue.
> >
> > -Michal
> >
> >
> > On Mon, Aug 11, 2014 at 12:49 PM, Carlos Santana <cs...@gmail.com>
> > wrote:
> >
> > > I like what Mark suggested of not passing json string in the command
> > line,
> > > and better to pass a json file.
> > > Why are we talking about 4.0 release? This can be landed on 3.x unless
> > I'm
> > > missing something very obvious.
> > >
> > > I would also would like to propose that we expose the hidden
> config.json
> > as
> > > a plublic file on the root of the project like cordova.json (easy to
> > find,
> > > easy to edit, easy to understand what's going on).
> > > Allowing the www template come with a default cordova.json with default
> > > values, and allow downstream distributions like IBM :-), to have a
> > > different template for "cordova create --copy-from=ibmtemplate/) with a
> > > different cordova.json
> > > Also cordova.json can serve as a way to identity a cordova project root
> > > directory by high level IDE/Tools
> > > maybe this change of cordova.json is a big enough for a 4.x
> > >
> > >
> > >
> > > On Mon, Aug 11, 2014 at 11:27 AM, Parashuram Narasimhan (MS OPEN TECH)
> <
> > > panarasi@microsoft.com> wrote:
> > >
> > > > Should we go ahead and create a branch in the main project so that
> you
> > > can
> > > > also add your ideas to it? We could target this feature for a 4.0
> > > release.
> > > >
> > > > -----Original Message-----
> > > > From: Mark Koudritsky [mailto:kamrik@google.com]
> > > > Sent: Monday, August 11, 2014 7:56 AM
> > > > To: dev@cordova.apache.org
> > > > Subject: Re: Directory Structure - CLI directory config proposal
> > > >
> > > > 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-directorie
> > > > > s/
> > > > > [4]
> > > > >
> > https://github.com/MSOpenTech/cordova-cli/tree/configurable-directorie
> > > > > s/
> > > > >
> > > > > 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 <go...@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*
> > > > > > > > > <ld...@apache.org> | | *ldeluca@us.ibm.com*
> > > > > > > > > <ld...@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>
> > > > > > > >
> > > > > > >
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Carlos Santana
> > > <cs...@gmail.com>
> > >
> >
>
>
>
> --
> Carlos Santana
> <cs...@gmail.com>
>

Re: Directory Structure - CLI directory config proposal

Posted by Carlos Santana <cs...@gmail.com>.
Yep I agree with using .cordova/config.json for this directory config. and
it would be in 3.x should not wait for 4.x



On Mon, Aug 11, 2014 at 1:07 PM, Michal Mocny <mm...@chromium.org> wrote:

> Lets not add a new public config file until we have many long talks to
> figure out all the requirements for a future CLI.  Perhaps PGDay US will be
> a good opportunity to get together in person and hash out some ideas?
>
> And since I don't think we should block work like what is being discussed
> here, we should continue to use the .cordova/config.json.  We can migrate
> those features to a public config file without issue.
>
> -Michal
>
>
> On Mon, Aug 11, 2014 at 12:49 PM, Carlos Santana <cs...@gmail.com>
> wrote:
>
> > I like what Mark suggested of not passing json string in the command
> line,
> > and better to pass a json file.
> > Why are we talking about 4.0 release? This can be landed on 3.x unless
> I'm
> > missing something very obvious.
> >
> > I would also would like to propose that we expose the hidden config.json
> as
> > a plublic file on the root of the project like cordova.json (easy to
> find,
> > easy to edit, easy to understand what's going on).
> > Allowing the www template come with a default cordova.json with default
> > values, and allow downstream distributions like IBM :-), to have a
> > different template for "cordova create --copy-from=ibmtemplate/) with a
> > different cordova.json
> > Also cordova.json can serve as a way to identity a cordova project root
> > directory by high level IDE/Tools
> > maybe this change of cordova.json is a big enough for a 4.x
> >
> >
> >
> > On Mon, Aug 11, 2014 at 11:27 AM, Parashuram Narasimhan (MS OPEN TECH) <
> > panarasi@microsoft.com> wrote:
> >
> > > Should we go ahead and create a branch in the main project so that you
> > can
> > > also add your ideas to it? We could target this feature for a 4.0
> > release.
> > >
> > > -----Original Message-----
> > > From: Mark Koudritsky [mailto:kamrik@google.com]
> > > Sent: Monday, August 11, 2014 7:56 AM
> > > To: dev@cordova.apache.org
> > > Subject: Re: Directory Structure - CLI directory config proposal
> > >
> > > 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-directorie
> > > > s/
> > > > [4]
> > > >
> https://github.com/MSOpenTech/cordova-cli/tree/configurable-directorie
> > > > s/
> > > >
> > > > 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 <go...@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*
> > > > > > > > <ld...@apache.org> | | *ldeluca@us.ibm.com*
> > > > > > > > <ld...@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>
> > > > > > >
> > > > > >
> > > >
> > >
> >
> >
> >
> > --
> > Carlos Santana
> > <cs...@gmail.com>
> >
>



-- 
Carlos Santana
<cs...@gmail.com>

Re: Directory Structure - CLI directory config proposal

Posted by Michal Mocny <mm...@chromium.org>.
Lets not add a new public config file until we have many long talks to
figure out all the requirements for a future CLI.  Perhaps PGDay US will be
a good opportunity to get together in person and hash out some ideas?

And since I don't think we should block work like what is being discussed
here, we should continue to use the .cordova/config.json.  We can migrate
those features to a public config file without issue.

-Michal


On Mon, Aug 11, 2014 at 12:49 PM, Carlos Santana <cs...@gmail.com>
wrote:

> I like what Mark suggested of not passing json string in the command line,
> and better to pass a json file.
> Why are we talking about 4.0 release? This can be landed on 3.x unless I'm
> missing something very obvious.
>
> I would also would like to propose that we expose the hidden config.json as
> a plublic file on the root of the project like cordova.json (easy to find,
> easy to edit, easy to understand what's going on).
> Allowing the www template come with a default cordova.json with default
> values, and allow downstream distributions like IBM :-), to have a
> different template for "cordova create --copy-from=ibmtemplate/) with a
> different cordova.json
> Also cordova.json can serve as a way to identity a cordova project root
> directory by high level IDE/Tools
> maybe this change of cordova.json is a big enough for a 4.x
>
>
>
> On Mon, Aug 11, 2014 at 11:27 AM, Parashuram Narasimhan (MS OPEN TECH) <
> panarasi@microsoft.com> wrote:
>
> > Should we go ahead and create a branch in the main project so that you
> can
> > also add your ideas to it? We could target this feature for a 4.0
> release.
> >
> > -----Original Message-----
> > From: Mark Koudritsky [mailto:kamrik@google.com]
> > Sent: Monday, August 11, 2014 7:56 AM
> > To: dev@cordova.apache.org
> > Subject: Re: Directory Structure - CLI directory config proposal
> >
> > 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-directorie
> > > s/
> > > [4]
> > > https://github.com/MSOpenTech/cordova-cli/tree/configurable-directorie
> > > s/
> > >
> > > 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 <go...@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 <ag...@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*
> > > > > > > <ld...@apache.org> | | *ldeluca@us.ibm.com*
> > > > > > > <ld...@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>
> > > > > >
> > > > >
> > >
> >
>
>
>
> --
> Carlos Santana
> <cs...@gmail.com>
>

Re: Directory Structure - CLI directory config proposal

Posted by Carlos Santana <cs...@gmail.com>.
I like what Mark suggested of not passing json string in the command line,
and better to pass a json file.
Why are we talking about 4.0 release? This can be landed on 3.x unless I'm
missing something very obvious.

I would also would like to propose that we expose the hidden config.json as
a plublic file on the root of the project like cordova.json (easy to find,
easy to edit, easy to understand what's going on).
Allowing the www template come with a default cordova.json with default
values, and allow downstream distributions like IBM :-), to have a
different template for "cordova create --copy-from=ibmtemplate/) with a
different cordova.json
Also cordova.json can serve as a way to identity a cordova project root
directory by high level IDE/Tools
maybe this change of cordova.json is a big enough for a 4.x



On Mon, Aug 11, 2014 at 11:27 AM, Parashuram Narasimhan (MS OPEN TECH) <
panarasi@microsoft.com> wrote:

> Should we go ahead and create a branch in the main project so that you can
> also add your ideas to it? We could target this feature for a 4.0 release.
>
> -----Original Message-----
> From: Mark Koudritsky [mailto:kamrik@google.com]
> Sent: Monday, August 11, 2014 7:56 AM
> To: dev@cordova.apache.org
> Subject: Re: Directory Structure - CLI directory config proposal
>
> 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-directorie
> > s/
> > [4]
> > https://github.com/MSOpenTech/cordova-cli/tree/configurable-directorie
> > s/
> >
> > 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 <go...@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 <ag...@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*
> > > > > > <ld...@apache.org> | | *ldeluca@us.ibm.com*
> > > > > > <ld...@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>
> > > > >
> > > >
> >
>



-- 
Carlos Santana
<cs...@gmail.com>

RE: Directory Structure - CLI directory config proposal

Posted by "Parashuram Narasimhan (MS OPEN TECH)" <pa...@microsoft.com>.
Should we go ahead and create a branch in the main project so that you can also add your ideas to it? We could target this feature for a 4.0 release. 

-----Original Message-----
From: Mark Koudritsky [mailto:kamrik@google.com] 
Sent: Monday, August 11, 2014 7:56 AM
To: dev@cordova.apache.org
Subject: Re: Directory Structure - CLI directory config proposal

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-directorie
> s/
> [4]
> https://github.com/MSOpenTech/cordova-cli/tree/configurable-directorie
> s/
>
> 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 <go...@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 <ag...@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* 
> > > > > <ld...@apache.org> | | *ldeluca@us.ibm.com* 
> > > > > <ld...@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>
> > > >
> > >
>

Re: Directory Structure - CLI directory config proposal

Posted by Mark Koudritsky <ka...@google.com>.
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 <go...@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 <ag...@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*
> > > > > <ld...@apache.org> | | *ldeluca@us.ibm.com* <ld...@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>
> > > >
> > >
>

Re: Directory Structure - CLI directory config proposal

Posted by "Wargo, John" <jo...@sap.com>.
We should definitely stay away from passing json on the command line.  It's a nightmare, there has to be a better way.

John M. Wargo

> On Aug 10, 2014, at 12:39 PM, "Sergey Grebnov (Akvelon)" <v-...@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 <go...@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 <ag...@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 <ld...@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*
>>>>> <ld...@apache.org> | | *ldeluca@us.ibm.com* <ld...@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>
>>>