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

Consistent naming of options and arguments that do the same thing #12784

Closed
alan-agius4 opened this issue Oct 29, 2018 · 6 comments · Fixed by #13049
Closed

Consistent naming of options and arguments that do the same thing #12784

alan-agius4 opened this issue Oct 29, 2018 · 6 comments · Fixed by #13049

Comments

@alan-agius4
Copy link
Collaborator

alan-agius4 commented Oct 29, 2018

At the moment, certain options and arguments that do the same thing should are not named the same across all schematics.

In ng new to skip the creation of spec files, one needs to use --skip-test, with an alias of -S, while in other schematics it is --spec and no alias.

In the component schematics ng generate component, to specify the style preprocessor you need to use --styleext, while in ng new this is named --style

We should discuss this, choose the preferred namings and align all the same options to make it easier for the users.

@alan-agius4 alan-agius4 added severity1: confusing area: schematics/angular needs: discussion On the agenda for team meeting to determine next steps labels Oct 29, 2018
@ngbot ngbot bot added this to the needsTriage milestone Oct 29, 2018
@EmmanuelDemey
Copy link
Contributor

I prefer --skip-test and --style

@hansl
Copy link
Contributor

hansl commented Nov 15, 2018

Let's review it for v8. We have a design in place and a discussion.

@hansl hansl removed the needs: discussion On the agenda for team meeting to determine next steps label Nov 29, 2018
kyliau pushed a commit that referenced this issue Dec 11, 2018
… that do the same thing

This aligns options that do the same thing:
1) `skipSpecs` and `spec` has been deprecated in favor of `skipTests`.
2) `styleext` has been deprecated in favor of `style` since the latest is two words.

Fixes #12784
@EatonZ
Copy link
Contributor

EatonZ commented Jan 8, 2019

When I create a new project using the just-released 6.2 CLI and --skip-tests=true --style="scss", the new angular.json file uses the new skipTests field as expected, but instead of "style": "scss" under @schematics/angular:component, I still see "styleext": "scss".

The PR clearly states "styleext has been deprecated in favor of style since the latest is two words.", so this appears to be have been overlooked for new project creation.

@EatonZ
Copy link
Contributor

EatonZ commented Jan 19, 2019

@alan-agius4 @hansl @kyliau See above - behavior hasn't changed in the latest version so just checking if anyone saw this comment.

@alan-agius4
Copy link
Collaborator Author

@EatonZ, just saw your comment. Ideally, you open new issue when there is a bug.

That said, I will land a PR for this soon, since it's a minor thing.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants