-
Notifications
You must be signed in to change notification settings - Fork 12k
Generate(component): Does not default to SCSS when specified in .angular-cli.json
#7624
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
Comments
I face same problem |
You can use flag |
But why is not documented? |
I also just noticed that my specified default "prefix" is not working either. @lubkoKuzenko You are correct, the individual flags still work but this bug report is for the |
I just faced the same problem. It was working with It should supposed to be fixed in #7430, but the problem persists. |
Experiencing this with 1.4.1 as well. |
Seeing this with 1.4.1 as well. Cheers. |
Same problem with 1.4.2 |
I have the same problem with 6.0.0-rc.3 |
Same problem with 6.0.3 |
Same problem with 6.0.2 |
Same problem with 6.0.1 . My solution was to use the
A bunch of other links said to use a |
"schematics": { |
Maybe I'm wrong. But I do not understand why this bug is closed. It definitely does not work in the latest version (Angular CLI 6.0.3). |
Agreed, I am having the same issue with Angular 6. |
I'm also having this issue: |
Also having this issue on Angular 6. |
@Jrb1x Use |
Same issue on a totally new project. I use "ng new my-app --style=scss" and it's works (generate styles.scss for exemple), but "ng g c my-component" generate an .css |
When I use this one: http://prntscr.com/lt11a8 (I use ngrx also) |
I would really love to see the ng generate respect: "schematics": { Seems like a simple feature to implement and one that would be consistent with user expectations for a product of this quality. |
In angular.json, set "schematics" as below to default scss when generate new component
|
@ming0627 I have this already in my angular.json (CLI Version: 7.3.8), and it is being ignored... UPDATE: It looks like its not respecting the schematic when you do not specify the project My workspace has 2 projects, 'my-app' and 'my-lib' Running 'ng g c my-component' generates with default css file extension Running 'ng g c my-component --project=my-app' generates with the schematic set scss file extension |
Still not fixed in 2019, LMAO... |
Working fine for me on Here is the minimum
|
@rynop Thank you so much . The change in the "schematics" in angular.json makes the angular-cli adhere to the rule atleast in angular 8 |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report or Feature Request (mark with an
x
)Versions.
@angular/cli: 1.4.0
node: 8.4.0
os: darwin x64
@angular/animations: 4.4.0-RC.0
@angular/cdk: 2.0.0-beta.8
@angular/common: 4.4.0-RC.0
@angular/compiler: 4.4.0-RC.0
@angular/core: 4.4.0-RC.0
@angular/flex-layout: 2.0.0-beta.9
@angular/forms: 4.4.0-RC.0
@angular/http: 4.4.0-RC.0
@angular/material: 2.0.0-beta.8
@angular/platform-browser: 4.4.0-RC.0
@angular/platform-browser-dynamic: 4.4.0-RC.0
@angular/router: 4.4.0-RC.0
@angular/cli: 1.4.0
@angular/compiler-cli: 4.4.0-RC.0
@angular/language-service: 4.4.0-RC.0
@angular/service-worker: 1.0.0-beta.16
typescript: 2.5.2
Repro steps.
Run
ng g c foo
The log given by the failure.
No failure
Desired functionality.
Result:
foo.component.css
Expected Result:
foo.component.scss
Mention any other details that might be useful.
.angular-cli.json Example:
The text was updated successfully, but these errors were encountered: