cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michal Mocny <mmo...@chromium.org>
Subject Re: Some thoughts/questions on the new --save feature
Date Tue, 03 Mar 2015 17:12:05 GMT
Yet more clarification: your git repo should look like:

- www/
  - index.html
  - ...
- config.xml
- ...

NOT

- config.xml
- index.html
- ...

On Tue, Mar 3, 2015 at 11:59 AM, Michal Mocny <mmocny@chromium.org> wrote:

> Raymond, you should just include your config.xml in the repo along with
> your www.  It will be imported as part of --copy-from and should (I haven't
> tested!) auto-restore plugins with this new feature.
>
> As for default not --save, this is mostly for npm compatibility, but also
> because we decided to auto-restore on prepare (unlike npm which require
> manual install).  This way, the new feature is 100% opt-in for users of the
> existing tools, but you automatically use the feature if you clone a
> project that is using the feature.  I think thats a good balance.
>
> Also, if you forget to --save plugins, you can re-run the add command with
> --save without hitting the network.  (But I don't think there is a cordova
> plugin --save to just add all installed plugins, we could consider adding
> that).
>
> -Michal
>
> On Tue, Mar 3, 2015 at 11:10 AM, Raymond Camden <raymondcamden@gmail.com>
> wrote:
>
>> 1) I can see the logic there, but it seems like folks would want to
>> save so much, overwhelmingly so, that it makes sense to not follow the
>> expectation here? Also, would our "typical" user be more familiar with
>> Node and be confused by this?
>>
>> 2) I know about the link too, my issue is more about what I (I being
>> the person sharing code) would publish. Right now I share *just* the
>> www folder so folks can --copy-from or link, whatever. But with this
>> new feature, I'd have to publish the entire project.
>>
>> That's what I'm asking about - does that make sense?
>>
>> To be clear, I'm not saying we need a magical solution for this, as I
>> said, my use case is *not* the norm. I'm mainly just wondering if
>> there is perhaps some elegant solution to including a) a small amount
>> of files and b) easy setup for folks using my demos.
>>
>>
>> On Tue, Mar 3, 2015 at 9:51 AM, Steven Gill <stevengill97@gmail.com>
>> wrote:
>> > 1) I would say it is not autosave by default so we follow node/npm
>> style.
>> > You have to be explicit when saving dependencies to node projects.
>> Example
>> > "npm install browserify --save".
>> >
>> > 2) I believe their is a --link command to point to your www for your
>> > Cordova project to use. This isn't a perfect solution for your use case
>> but
>> > it better than manually copying. Others who are more familiar with this
>> can
>> > hopefully elaborate.
>> > On Mar 3, 2015 6:42 AM, "Victor Sosa" <sosah.victor@gmail.com> wrote:
>> >
>> >> +1 on Raymond's idea, I also why --save isn't default. When talking
>> about
>> >> SCMs, the best practice for Cordova applications is to share them with
>> no
>> >> platforms nor plugins, so each time a developer checks out the project
>> from
>> >> the repo, he/she will need to add the appropriate plugins and desired
>> >> platform. Why not making the developers life easier with this --save
>> flag?
>> >>
>> >> 2015-03-03 8:27 GMT-06:00 Raymond Camden <raymondcamden@gmail.com>:
>> >>
>> >> > 1) Is there any reason why --save isn't true by default? It would
>> seem
>> >> > that in a majority of cases I'd want to save my plugins to the
>> >> > configuration file. I definitely see times when I would *not* want
to
>> >> > do so, but it seems like that would be the minority of cases.
>> >> >
>> >> > 2) This is probably an edge case, but...
>> >> >
>> >> > One of the things I do when building Cordova examples is put up my
>> www
>> >> > folder in a repo. My thinking is that my readers can grab the repo,
>> >> > and then make a new project and use --copy-from to grab the folder.
>> >> > This gives them my www crap and lets them go crazy.
>> >> >
>> >> > For plugins, I've been using a readme file to tell users what to do.
>> >> >
>> >> > I'd like to make use of this new feature to persist plugins and save
>> >> > users at least one step. (In theory they would just need to add the
>> >> > platform they want to test on.)
>> >> >
>> >> > But in order to do so, I can't just ship the www folder, I have to
>> >> > ship an entire Cordova project. That isn't a big deal per se, but it
>> >> > does mean they would need to copy a folder manually, possibly modify
>> >> > the app id, and then start working on the assets.
>> >> >
>> >> > Given that I think my use case is probably pretty minor, is there
>> some
>> >> > thought as to how one could distribute sample code and make use of
>> >> > this feature?
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> >
>> >>
>> ===========================================================================
>> >> > Raymond Camden, Developer Advocate for MobileFirst at IBM
>> >> >
>> >> > Email : raymondcamden@gmail.com
>> >> > Blog : www.raymondcamden.com
>> >> > Twitter: raymondcamden
>> >> >
>> >> > ---------------------------------------------------------------------
>> >> > To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
>> >> > For additional commands, e-mail: dev-help@cordova.apache.org
>> >> >
>> >> >
>> >>
>> >>
>> >> --
>> >> Victor Adrian Sosa Herrera
>> >> IBM Software Engineer
>> >> Guadalajara, Jalisco
>> >>
>>
>>
>>
>> --
>>
>> ===========================================================================
>> Raymond Camden, Developer Advocate for MobileFirst at IBM
>>
>> Email : raymondcamden@gmail.com
>> Blog : www.raymondcamden.com
>> Twitter: raymondcamden
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
>> For additional commands, e-mail: dev-help@cordova.apache.org
>>
>>
>

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