You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When invoked with --no-component-class (which is the default in Octane), we should show the following Pro Tip™ at the end of the generator run:
❯❯❯ ember generate component foo
installing component
create app/components/foo.hbs
installing component-test
create tests/integration/components/foo-test.js
Tip: run `ember generate component-class foo` if you want to add a class
The exact message is TBD, but this is a perfectly good start.
When invoked with --component-class= set to any other values (whether using that flag or a
related alias/shorthand), the message should not be shown.
New alias, --with-component-class
Add a new alias, --with-component-class, as the "opposite" of --no-component-class.
This is roughly the same as running ember generate component foo && ember generate component-class foo back-to-back, other than that you should not see the Pro Tip™ message.
This flag serves as a way to say "I want a class" without having to think too much about "which one". Pre-Octane, it expands to --component-class=@ember/component. Post-Octane, it expands to --component-class=@glimmer/component.
This is also useful in guides and documentation, where you want to use the more verbose flag for readability, but not as verbose as --component-class=@glimmer/component, which is explicitly drawing attention to the component class multiverse. It's not a bad thing to have choices, but most of the time you shouldn't have to care.
Split the class generation part into a separately invokable blueprint/generator, similar to how the component-test blueprint/generator can be invoked separately.
When the component generator is used with any of the --component-class=... other than --no-component-class (directly or through the aliases), the main component generator will delegate to this generator for the class generation, again similar to how component-test generator works.
Because --with-component-class just delegates to this under-the-hood, the have the same default class. Pre-Octane: --component-class=@ember/component. Post-Octane --component-class=@glimmer/component.
This generator should accept most of the same flags that is accepted by the main component generator. For example, and at minimum, it should be possible to call ember generate component-class with the --component-class and --component-structure flags, with the same aliases/shorthands supported by the main generator.
❯❯❯ ember generate component-class foo
installing component-class
create app/components/foo.js
The text was updated successfully, but these errors were encountered:
Add a Pro Tip™
When invoked with
--no-component-class
(which is the default in Octane), we should show the following Pro Tip™ at the end of the generator run:The exact message is TBD, but this is a perfectly good start.
When invoked with
--component-class=
set to any other values (whether using that flag or arelated alias/shorthand), the message should not be shown.
New alias,
--with-component-class
Add a new alias,
--with-component-class
, as the "opposite" of--no-component-class
.This is roughly the same as running
ember generate component foo && ember generate component-class foo
back-to-back, other than that you should not see the Pro Tip™ message.This flag serves as a way to say "I want a class" without having to think too much about "which one". Pre-Octane, it expands to
--component-class=@ember/component
. Post-Octane, it expands to--component-class=@glimmer/component
.This is also useful in guides and documentation, where you want to use the more verbose flag for readability, but not as verbose as
--component-class=@glimmer/component
, which is explicitly drawing attention to the component class multiverse. It's not a bad thing to have choices, but most of the time you shouldn't have to care.New generator
ember generate component-class
Split the class generation part into a separately invokable blueprint/generator, similar to how the
component-test
blueprint/generator can be invoked separately.When the component generator is used with any of the
--component-class=...
other than--no-component-class
(directly or through the aliases), the main component generator will delegate to this generator for the class generation, again similar to howcomponent-test
generator works.Because
--with-component-class
just delegates to this under-the-hood, the have the same default class. Pre-Octane:--component-class=@ember/component
. Post-Octane--component-class=@glimmer/component
.This generator should accept most of the same flags that is accepted by the main component generator. For example, and at minimum, it should be possible to call
ember generate component-class
with the--component-class
and--component-structure
flags, with the same aliases/shorthands supported by the main generator.The text was updated successfully, but these errors were encountered: