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

Updates info about component generator after octane release #136

Merged
merged 2 commits into from
Mar 4, 2020

Conversation

gokatz
Copy link
Contributor

@gokatz gokatz commented Oct 2, 2019

addresses #134

@gokatz gokatz changed the title WIP: updates info about component generator after octane release updates info about component generator after octane release Oct 2, 2019
`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`.**
Copy link
Contributor Author

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 ?

@gokatz gokatz changed the title updates info about component generator after octane release WIP: updates info about component generator after octane release Oct 2, 2019
@gokatz gokatz force-pushed the update-component-generator branch 2 times, most recently from fdbb400 to 08c4ac2 Compare October 3, 2019 17:47
@chancancode
Copy link
Contributor

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.)


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
Copy link
Contributor

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"

@wycats
Copy link

wycats commented Oct 4, 2019

I agree with @chancancode. The point of this section is to describe the general syntax of the ember generate command, not to exhaustively document the command.

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.

@jenweber
Copy link
Contributor

jenweber commented Oct 4, 2019

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?

@gokatz
Copy link
Contributor Author

gokatz commented Oct 5, 2019

maybe we can try something similar to FAQs

@wycats
Copy link

wycats commented Oct 7, 2019

@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.

@gokatz
Copy link
Contributor Author

gokatz commented Oct 7, 2019

Updated the PR with the required changes. cc: @jenweber

@gokatz gokatz changed the title WIP: updates info about component generator after octane release Updates info about component generator after octane release Oct 23, 2019
@locks locks requested a review from jenweber January 31, 2020 01:16
guides/basic-use/cli-commands.md Outdated Show resolved Hide resolved
@gokatz gokatz requested a review from locks February 24, 2020 05:21
Copy link
Member

@MelSumner MelSumner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@MelSumner MelSumner merged commit 6fd5508 into ember-learn:master Mar 4, 2020
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.

6 participants