-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
Updates info about component generator after octane release #136
Updates info about component generator after octane release #136
Conversation
2433661
to
aa81899
Compare
guides/basic-use/cli-commands.md
Outdated
`ember generate` creates new files within your app. For example, you can use it to create components, routes, services, models, and more. For a full list, type `ember generate --help`. | ||
`ember generate` creates new files within your app. For example, you can use it to create components, routes, services, models, and more. | ||
|
||
**For a full list, type `ember generate --help`.** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
made it as a bold separate line to emphasis. I find it hard to skim in the before version. Your thought @jenweber ?
fdbb400
to
08c4ac2
Compare
I disagree with the criteria for this change. This page is a documentation about the concept and syntax of generators in general, not a place to learn what the component generator does specifically. It was just given as an example to illustrate what invoking a generator looks like. Given that, I don't think it is important to be exhaustive about all the possible options you can pass, or the precise difference before and after octane. I think it's fine to give one example of "what passing an option look like" (though I think it's also fine not to). If we feel like it's important to enumerate the exact files being generated, and that the readers will find it surprising when the actual files generated does not match with what is being described, I think we can just pick a different generator that doesn't have that difference before and after Octane, e.g. the route generator. (The "Learn more" section mentions the route generator anyway.) |
guides/basic-use/cli-commands.md
Outdated
|
||
The CLI's `generate` command will ensure that new files contain the necessary boilerplate, that they go in the right directories, and that file naming conventions are followed. For example, components must always have a dash in their names. | ||
To avoid mistakes that are hard to debug, always use the CLI to create files instead of creating the files by hand. | ||
|
||
### Example use | ||
### Example Use: Component Generators |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is not quite right, we should keep the "Example Use" header to be consistent with the rest of the page, but also because this is "An example of using some generator"
I agree with @chancancode. The point of this section is to describe the general syntax of the It looks like the example previously used a route generator, which doesn't have any Octane-related problems, so let's just go back to generating a route as an example. |
I think we need to show a component example somewhere. Perhaps we could make the "example of generating files" generic, to be about routes, and put this info in a new section that is about generating components. Or possibly it could be an example of passing options that follows after the route example. "How do I get a class for my component?" seems like a likely question that should be answerable in the CLI guides. What do you all think? |
maybe we can try something similar to FAQs |
@gokatz makes sense. I think we should use the route as an example here. I fully agree with @jenweber that we should find a place to document the way to get a class for a component, which will probably be a common question. Because the CLI guides aren't versioned, they're probably not the best place for this piece of information right now. We can link to the Octane guides, which are versioned, and revisit this question once the CLI guides are versioned. |
08c4ac2
to
2155f39
Compare
2155f39
to
8c2aa2d
Compare
Updated the PR with the required changes. cc: @jenweber |
Co-Authored-By: Ricardo Mendes <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
addresses #134