Angular-cli: generate not respecting the inline styles, inline templates, specs in .angular-cli.json

Created on 26 Sep 2017  路  4Comments  路  Source: angular/angular-cli

Bug Report or Feature Request (mark with an x)

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

Versions.

macOS Sierra 10.12.6
@angular/cli: 1.4.3
node: 6.11.3
os: darwin 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
@angular/language-service: 4.4.3
typescript: 2.3.4

Repro steps.

ng new ignite --minimal
cd ignite
ng g c heroes --flat

The log given by the failure.

This creates 4 files.

heroes.component.html
heroes.component.scss
heroes.component.spec.ts
heroes.component.ts

Desired functionality.

I expected only 1 file, heroes.component.ts, to be created.

Mention any other details that might be useful.

The .angular-cli.json contains the proper settings.

Also, if I run ng g c heroes --flat --it --is --spec false then I get one file.

It appears that the commands are not checking the json file's settings.

image

high regression bufix obvious

Most helpful comment

I see now that ng g c foo is broken, but ng g component works. Same for the other aliases I tried.

Current workaround is to use the full name of the schematic (aka blueprint).

... assuming -it -is and --spec false are set in the .angular-cli.json ...

// these work
ng g component mycomponent
ng g service myservice
// these DO NOT work
ng g c mycomponent
ng g s myservice

@Brocco is aware and on it.

All 4 comments

I see now that ng g c foo is broken, but ng g component works. Same for the other aliases I tried.

Current workaround is to use the full name of the schematic (aka blueprint).

... assuming -it -is and --spec false are set in the .angular-cli.json ...

// these work
ng g component mycomponent
ng g service myservice
// these DO NOT work
ng g c mycomponent
ng g s myservice

@Brocco is aware and on it.

Is there an estimated fix date on this? @Brocco

We fixed this with the new workspace and the way the flags are used and propagated. Closing this as fixed.

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._

Was this page helpful?
0 / 5 - 0 ratings