Closed zhouyaoji closed 10 years ago
Hm, my idea behind this might have been different than both of yours.
I was hoping that this could be the first thing that any new Mojito user would see, regardless of what application they were creating. So:
mojito create app foo
Or:
mojito create app bar
Would all generate these links back to the official documentation. Once the developer starts developing, then they could just change the HTML or switch the template. It also acts as a quick smoke test for other Mojito developers to make sure Mojito was installed okay for them with no issues.
Without that, then this seems to just be more of an extended tutorial, in my opinion. What do you guys think?
Actually, yeah...the quick start app in its entirety might be too large for people that just want to get up and running.
Can we generate a better HTML page than this, at least, with links to the documentation?
https://github.com/yahoo/mojito-cli-create/blob/develop/archetypes/mojit/full/views/index.hb.html
@clarle @isao So, how about we keep the quickstartguide
archetype, remove the changes to index.js
, and update the index.hb.html
of the full app to display a reference page with links to documentation as well as instructions for creating the quickstart app? That way we don't break the convention for creating an app, give users a more useful default page, and allow developers to create the quickstart guide app so they can read introductory documentation.
Alright, looks good to me. :+1: from me if @isao's good too.
thanks @clarle, @zhouyaoji.
a few points:
mojito create mojit quickstartquide
won't work. mojito create app
has four subtypes: full, default, simple, yahoo, and quickstartquide. The latter is nothing like the others, it's a fully-functional demo app right? Why not let folks just git clone
it? If you must include the quickstartquide app in the archetypes bundled with mojito-cli-create
then I think putting it in ./archetypes/quickstartquide
or something like ./archetypes/demo/quickstartquide
would be preferred. This means the cli params would be
mojito create quickstartquide foo
or
mojito create demo quickstartquide foo
Usage/README might be clearer too, so you wouldn't have to explain that create app [full,default,simple,yahoo]
does one kind of thing, and create app quickstartguide
does another.
@isao Developers can clone mojito
and run the quickstartguide
app now, but we wanted a quick way for newbies to read documentation and to be able to easily view a more substantial application. I'm not as convinced that it's good idea because of the points you've raised and the options you've suggested.
@clarle What if we just keep the change to the default mojit's index.hb.html
, which includes a list of links to documentation for now unless you have a better idea?
Quick note, the travis failure, will go away if you rebase this pr against pull #25. That is, ideally we merge that first.
@isao Developers can clone mojito and run the quickstartguide app now, but we wanted a quick way for newbies to read documentation and to be able to easily view a more substantial application. I'm not as convinced that it's good idea because of the points you've raised and the options you've suggested.
Well, if the goal is to get a working demo app to play with as quickly as possible, then a purpose-built git repo or a tar ball is the way to go. Or curl ...| sh
or somesuch.
I'm not the last word on this of course, and I'm not opposed to adding stuff to the bundled archetypes (in fact, I'd love to see it extensible and not tied to what in included in this package, but that's an old and hand-wavey refrain). The idea of a demo app that is also a developer reference is nice too.
So I suggest a new PR, that puts the qs guide in ./archetypes/quickstartguide
or, if there might be more of this kind, ./archetypes/demo/quickstartguide
. It's cleaner and you don't mess with the weird legacy special casing of "app" and "mojit" sub-commands.
in other words, update the read me, usage, and namespace it (so it does confuse)... it's almost there. :)
again, it would be nice if the argument to mojito create
could also be a URI, so we could have the one-off like this, and keep the code on the lighter side. Just my $0.02.
@isao Instead of closing this PR and opening a new one, I just updated this PR following your suggestions.
I wanted to retain the thread and also preserve the changes to the index.hb.html
.
Here's what I did:
demo
.quickstartguide
to archetypes/demo
.index.js
to recognize the new archetype.index.hb.html
.quickstartguide
demo app or add custom demo apps.I gave PR #25 a +1. So, either you or @clarle can merge the PR. Once you have merged that PR, I'll rebase my branch, and then you can let me know if we can merge this PR as well.
It looks good to me as is, and has my :+1:.
I think it's worth having this in here rather than as a separate git repo (which it already is). This won't be used in production, and it's good to have a fast way to make sure Mojito completely installed correctly.
:shipit:
@isao We wanted to allow newbies to create the quickstartguide as simply as possible so they could see an app in action and also read the docs. I agree though that it breaks the convention for creating apps, and there isn't much benefit. Let me ask the others to confirm if it's okay to just have the new archetype and just have users create the quickstartguide with
mojito create app quickstartguide
.