Skip to content

Generate file names with types by writing a dot instead of an extra spaced type parameter #2155

Closed
@shairez

Description

@shairez

I've tried to generate a new model class by running ng generate class hero/here.model

But it generated - hero/hero.ts and ignored what was after the dot.

@Brocco told me that it's because we should pass the "type" parameter with a space and not with a dot, like this - ng generate class hero/here model

I think that writing the file name as I want it to be (with the dot) is much more intuitive and not making developers go and read the docs to figure out what happened to their precious type :)
With not ignoring the "dot type" for the filename (but do ignoring it for the Class name), it'll just work more intuitively IMO.

Mike suggested to maybe we should have both options, after thinking about it I think it's always better to have just one choice rather than two, to minimize confusion and redundant documentation.

@hansl , @filipesilva , @Brocco I'm interested to hear what you think?

Does this make sense? if so, should we keep them both (dot and space) or just one?

Once we'll figure it out, I'll create the PR

Thanks!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions