Skip to content

ng g aliases do not honor .angular-cli.json defaults #7827

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

Closed
saverett opened this issue Sep 25, 2017 · 3 comments
Closed

ng g aliases do not honor .angular-cli.json defaults #7827

saverett opened this issue Sep 25, 2017 · 3 comments
Labels
P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful severity5: regression type: bug/fix

Comments

@saverett
Copy link
Contributor

saverett commented Sep 25, 2017

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Versions.

@angular/cli: 1.4.3 (also present in 1.4.2)
node: 6.9.1
os: win32 x64
@angular/animations: 4.4.3
@angular/common: 4.4.3
@angular/compiler: 4.4.3
@angular/core: 4.4.3
@angular/forms: 4.4.3
@angular/http: 4.4.3
@angular/platform-browser: 4.4.3
@angular/platform-browser-dynamic: 4.4.3
@angular/router: 4.4.3
@angular/cli: 1.4.3
@angular/compiler-cli: 4.4.3
typescript: 2.4.2

Repro steps.

Given the following .angular-cli.json configuration:

"defaults": {
    "component": {
      "flat": true,
      "inlineStyle": true,
      "inlineTemplate": false,
      "spec": false
    },
    "service": {
      "spec": false
    }
    ...
}

Using ng g aliases do not honor .angular-cli.json defaults:

>ng g c test
  create src/app/test/test.component.html (23 bytes)
  create src/app/test/test.component.spec.ts (614 bytes)
  create src/app/test/test.component.ts (261 bytes)
  create src/app/test/test.component.css (0 bytes)
  update src/app/app.module.ts (12070 bytes)

>ng g s blah
  create src/app/blah.service.spec.ts (362 bytes)
  create src/app/blah.service.ts (110 bytes)

...(present in other element aliases as well)

However ng g non-aliases do honor .angular-cli.json defaults:

>ng g component test
  create src/app/test.component.html (23 bytes)
  create src/app/test.component.ts (236 bytes)
  update src/app/app.module.ts (11819 bytes)

>ng g service blah
  create src/app/blah.service.ts (110 bytes)

...(present in other elements as well)

Desired functionality.

ng g aliases honor .angular-cli.json defaults

Mention any other details that might be useful.

Likely related to #7644 and #7662, but those issues do not call out the problems specific to using ng g aliases with .angular-cli.json defaults

@filipesilva filipesilva added P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful severity5: regression type: bug/fix labels Sep 27, 2017
@hansl hansl unassigned Brocco Feb 6, 2018
@hansl
Copy link
Contributor

hansl commented Sep 28, 2018

Could not reproduce this with the latest workspace. This has been fixed with the way we handle aliases and schematics.

image

@hansl hansl closed this as completed Sep 28, 2018
@saverett
Copy link
Contributor Author

saverett commented Oct 1, 2018

Thanks!

@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 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful severity5: regression type: bug/fix
Projects
None yet
Development

No branches or pull requests

4 participants