cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michal Mocny <>
Subject Re: When is .cordova created?
Date Mon, 21 Jul 2014 18:42:38 GMT
That directory is optional.  It will only exist if you have non standard
config options.  When using --link-to and --copy-from, we set the config
option { "lib": { "www": { "uri": ..., link: true/false } } }.  We also set
config settings for e.g. Custom platform paths and plugin search paths.

Since Mark added the ability to specify search path from the command line,
and to add platforms by path directly, there are fewer and fewer reasons to
have a custom cordova config file.  (Also, do we really even needed the
lib.www.url setting saved in there when using --link-to/--copy-from?).
 Theres even an autoPersist setting which specifies if config file changes
should apply temporarily or be written out to disk.

There's also the question of how cordova config files *should* look like in
the future (see app config.xml vs platform config.xml vs
.cordova/config.json vs app manifest.json), or even what it means to be a
cordova workspace (see gulp/grunt workflow suggestions).

So, while I see the value of having one file that guarantees marking a
cordova project, I'm hesitant to mandate the existence of the .cordova
folder.  Up till now, we've been using
`cordovaLib.cordova.findProjectRoot()` to find the root of a cordova
project.  That helper should probably be improved a bit, but its worked
well enough in practice.  Its probably a good candidate for breaking out
into its own node package.


On Mon, Jul 21, 2014 at 1:41 PM, Shazron <> wrote:

> My guess is ever since hooks were moved out of .cordova to hooks/ the
> creation of .cordova by default wasn't removed also when using
> --copy-from.
> On Mon, Jul 21, 2014 at 10:34 AM, Ray Camden <> wrote:
> > (This question feels like it *should* be appropriate here, but if I
> should raise it on the PG Google group, I will.)
> >
> > I recently released a Brackets extension that wrapped calls to the
> Cordova CLI. I wrote some simple logic to handle checking if a folder is a
> Cordova project. I simply looked for a subdirectory called .cordova.
> >
> > But a user told me the extension wasn't correctly seeing a Cordova
> project and when I tested, it looks like the default cordova create command
> will not make the folder. It only exists (so far in my testing) if I create
> a new project and use --copy-from.
> >
> > Is there a reason why .cordova doesn't always exist?
> >
> > Worse comes to worse, I may just use some logic to see if platforms,
> plugins, and www exist as subdirectories.

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