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

refactor(@angular/schematics): Add an extra option to not use dasheri… #12500

Merged
merged 1 commit into from
Oct 9, 2018

Conversation

vikerman
Copy link
Contributor

@vikerman vikerman commented Oct 6, 2018

…ze in findModuleFromOptions

In Google we prefer underscore instead of dashes. So this option is useful there.

Copy link
Contributor

@hansl hansl left a comment

Choose a reason for hiding this comment

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

Non blocking as I might not be available for review.

@@ -42,8 +43,9 @@ export function findModuleFromOptions(host: Tree, options: ModuleOptions): Path
const routingModuleExt = options.routingModuleExt || ROUTING_MODULE_EXT;

if (!options.module) {
options.normalizeName = options.normalizeName || strings.dasherize;
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of allowing for overwriting the name, why don't you let the parent pass in the formatting function (with dasherize being the default)? We have strings.underscore() which would allow you to format the name properly in google, whichever the input. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ugh Sorry. I think the variable is badly named. This is exactly what I'm trying to do.

normalizeName?: (str: string) => string;

Renamed it to nameFormatter.

@vikerman vikerman added the target: major This PR is targeted for the next major release label Oct 7, 2018
…ptions

In Google we prefer underscore instead of dashes. So this options is useful there.
@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 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants