Re: Behavior of --copy-from

2015-05-19 Thread Dmitry Blotsky
Hi Raymond, The semantics of “--copy-from” are: copy the passed path in place of the new project's “www” directory, which “cordova create” seems to obey. Is that not what happened in your case? However, the failure to copy over paths that start with “.” looks like a bug to me. Unless someone

Re: Behavior of --copy-from

2015-05-19 Thread Raymond Camden
No, what seems to happen to me is: If I copy-from a directory that has a www folder in it, then it is treated as the *root* of the new project and a proper Cordova folder is not created. If I copy-from a dir that does NOT have a www folder in it, it is treated as the www folder of a new project.

Re: Behavior of --copy-from

2015-05-19 Thread Raymond Camden
I definitely can't recreate the end up with a folder that isn't a project but --copy-from does seem to ignore files it doesn't recognize. I filed a bug for it. On Tue, May 19, 2015 at 6:07 AM, Raymond Camden raymondcam...@gmail.com wrote: No, what seems to happen to me is: If I copy-from a

Re: Behavior of --copy-from

2015-05-19 Thread Raymond Camden
Ok, so I filed a bug about it not copying misc files (https://issues.apache.org/jira/browse/CB-9041). I can understand wanting to skip platforms and plugins, but I think there are plenty of valid reasons to copy everything else. In my case, I built a hook for Visual Studio Code so I can do a build

Re: Behavior of --copy-from

2015-05-19 Thread Michal Mocny
The *intention* of copy-from / link-to is to import either (a) a web project, or (b) another cordova project. We used to check for (b) I think by the existence of a config.xml and www/ (note: double check config.xml is required). If that check passes, we copy those two nested contents only (I

Re: Behavior of --copy-from

2015-05-19 Thread Michal Mocny
Just checked: https://github.com/apache/cordova-lib/blob/master/cordova-lib/src/cordova/create.js#L179 Seems config.xml isn't required. We import the nested www/ if it exists, and same for config.xml merges and hooks. I would not expect any files/folders outside of www to be copied, dotfiles or

Re: Behavior of --copy-from

2015-05-19 Thread Michal Mocny
And for yet more context, I think this is because we did not want to import plugins / platforms, and so did not just cp -R the whole thing, but perhaps thats a better strategy. Up to you now :) -Michal On Tue, May 19, 2015 at 12:07 PM, Michal Mocny mmo...@chromium.org wrote: Just checked:

Behavior of --copy-from

2015-05-17 Thread Raymond Camden
I thought I remember seeing a thread on this, but GMail is being a bit cranky about how I search today. I had thought that if you used --copy-from and the directory you used included www itself, then the folders would be copied over to a new project and merged in with normal default items. I