Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add blueprint descriptions to ember help generate #1279

Merged

Conversation

jgwhite
Copy link
Contributor

@jgwhite jgwhite commented Jul 5, 2014

Also display (overridden) next to overridden blueprints.

Addresses #1237
Addresses #1274

ember-cli

TODO:

  • Add support for --verbose flag to show overridden blueprints (default: false)
  • Add descriptions to existing blueprints
  • Discuss availableOptions with regard to blueprints

@kimroen
Copy link
Contributor

kimroen commented Jul 5, 2014

Idea: What if instead of --show-overridden, --verbose shows overridden blueprints?

@jgwhite
Copy link
Contributor Author

jgwhite commented Jul 6, 2014

@kimroen good call — this way it can be a flag on help

@kimroen
Copy link
Contributor

kimroen commented Jul 9, 2014

Some attributes (like type on array) are optional. How can we show that and what the default is?

@jgwhite
Copy link
Contributor Author

jgwhite commented Jul 9, 2014

@kimroen I’m thinking we use the exact same api as commands. Doesn’t make so much sense for model blueprints—where options are unconstrained—but I can live with that.

@jgwhite
Copy link
Contributor Author

jgwhite commented Jul 15, 2014

@stefanpenner @rjackson @kimroen I think this is getting there. Could y’all review? Thx

@stefanpenner
Copy link
Contributor

LGTM

one thought is to allow also for blueprints via remote URI (not high priority, but still handy)

@jgwhite
Copy link
Contributor Author

jgwhite commented Jul 15, 2014

@stefanpenner as in ember new --blueprint http://cool-bluprints.com/some-cool-blueprint? That would be very nice.

@kimroen
Copy link
Contributor

kimroen commented Jul 15, 2014

I'm not sure the use of the attr:option syntax is clear enough here (maybe attr-name:option would be clearer?), but that could certainly be tweaked once this change is live.

Examples would probably make it clearer, but I'm not sure this prompt is the place for examples.

Other than that, 👍 for this.

@jgwhite
Copy link
Contributor Author

jgwhite commented Jul 15, 2014

@kimroen yeah, I’ve been looking around at Thor, Loom, etc. for inspiration on this. An example is almost always the most useful thing, but availableOptions and description don’t really allow for it.

I’m kinda into the idea of adding a USAGE or README file alongside index.js that would appear in this help output. Or is that nuts?

@kimroen
Copy link
Contributor

kimroen commented Jul 15, 2014

Sounds like something that could appear if you type ember help generate controller or something. Not sure if it's appropriate with more text for the listing.

@jgwhite
Copy link
Contributor Author

jgwhite commented Jul 15, 2014

Yeah. I think it’s worth getting ember help generate controller working before this PR is merged.

@kimroen
Copy link
Contributor

kimroen commented Jul 15, 2014

🎊

@jgwhite
Copy link
Contributor Author

jgwhite commented Jul 16, 2014

@stefanpenner would you be happy with changing behaviour of help

ember help command other-command ---> ember help command subcommand

in order to facilitate ember help generate controller?

@stefanpenner
Copy link
Contributor

@jgwhite yes

@kimroen
Copy link
Contributor

kimroen commented Aug 1, 2014

Would you mind updating the list of TODOs to reflect the new priorities?

@stefanpenner
Copy link
Contributor

sorry I feel I have let this linger, am i blocking progress?

@kimroen
Copy link
Contributor

kimroen commented Aug 1, 2014

@stefanpenner No, I don't think there's anything missing other than actually doing the changes.

If you have input on the proposal of a USAGE or README file alongside index.js to provide the text for ember help generate subcommand, I'm sure that would be welcome though 😄

@jgwhite
Copy link
Contributor Author

jgwhite commented Aug 1, 2014

Yeah, sorry — I got caught in a little analysis paralysis on this one. Will make a call on it this weekend and submit for proper approval.

@stefanpenner
Copy link
Contributor

@jgwhite :)

@rwjblue
Copy link
Member

rwjblue commented Sep 7, 2014

@jgwhite - Where are we at with this?

@jgwhite
Copy link
Contributor Author

jgwhite commented Sep 8, 2014

@rwjblue I’ve let this drag. Going to get what’s here into mergable shape this week. If it’s too far behind I’ll close and take a fresh run at it.

@jgwhite jgwhite force-pushed the blueprint-list-description-and-overrides branch 2 times, most recently from 107d6aa to a417808 Compare September 16, 2014 12:12
@jgwhite jgwhite changed the title [WIP] Add blueprint descriptions to ember help generate Add blueprint descriptions to ember help generate Sep 16, 2014
@jgwhite jgwhite force-pushed the blueprint-list-description-and-overrides branch 3 times, most recently from 8804eec to d95111f Compare September 16, 2014 13:28
@jgwhite
Copy link
Contributor Author

jgwhite commented Sep 16, 2014

@rwjblue @stefanpenner this is a first step but I think it’s good to merge. More PRs to follow with patches for option parsing.

@kimroen
Copy link
Contributor

kimroen commented Sep 16, 2014

❤️

Also display '(overridden)' next to overridden blueprints.

Addresses ember-cli#1237
Addresses ember-cli#1274

Pass options through printBasicHelp & printDetailedHelp

Hide overridden blueprints unless verbose flag is set

Add example descriptions to built-in blueprints

Add availableOptions to Blueprint
@jgwhite jgwhite force-pushed the blueprint-list-description-and-overrides branch from d95111f to cd52a2c Compare September 16, 2014 13:33
rwjblue added a commit that referenced this pull request Sep 16, 2014
…overrides

Add blueprint descriptions to ember help generate
@rwjblue rwjblue merged commit 44482f5 into ember-cli:master Sep 16, 2014
@rwjblue
Copy link
Member

rwjblue commented Sep 16, 2014

@jgwhite - As usual, thank you for the awesome work!

@jgwhite jgwhite deleted the blueprint-list-description-and-overrides branch September 17, 2014 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants