ionic-team / angular-toolkit

Angular Schematics and Builders for `@ionic/angular` apps.
MIT License
69 stars 30 forks source link

'type' argument not handled by cli #480

Closed marlon-ionic closed 1 year ago

marlon-ionic commented 1 year ago

Four of the Angular CLI generate sub-commands accept a type argument, which according to the Angular docs should:

Adds a developer-defined type to the filename, in the format "name.type.ts".

The option exists for:

Example: ionic g c myNewThing --type modal --dry-run

The output is:

ng generate component myNewThing --dry-run --project=app
CREATE src/app/my-new-thing/my-new-thing.component.scss (0 bytes)
CREATE src/app/my-new-thing/my-new-thing.component.html (31 bytes)
CREATE src/app/my-new-thing/my-new-thing.component.spec.ts (726 bytes)
CREATE src/app/my-new-thing/my-new-thing.component.ts (290 bytes)

But the expected naming should be:

src/app/my-new-thing/my-new-thing.modal.scss
src/app/my-new-thing/my-new-thing.modal.html
src/app/my-new-thing/my-new-thing.modal.spec.ts
src/app/my-new-thing/my-new-thing.modal.ts
mhartington commented 1 year ago

so this can't be supported at the moment as it requires a change in the CLI, and the change in the CLI would be considered a breaking change and break older ionic-v3 apps. Will connect with the team to discuss this.

mhartington commented 1 year ago

This should be fixed with v7 of the CLI