-
Notifications
You must be signed in to change notification settings - Fork 12k
ng generate does not respect defaults.styleExt settings #7644
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
It is not only the {
"apps": [
{
"prefix": "ts",
}
],
"defaults": {
"styleExt": "scss",
"component": {}
}
}
" but when generating a new component I think that this is a serious regression compared to v1.3.2 |
Actually all defaults are ignored in the |
Same with me, I raised issue over SO for this, Here is link , https://stackoverflow.com/questions/46139997/angular-cli-1-4-1-ng-always-generate-spec-file-and-css-even-default-prefix-is I thought , its only with me, but seems CLI team broke things very seriously here. I hope by downgrading it solve temporary. |
The style extension issue was already reported here: #7624 @Brocco I believe there is a problem with the schematics library. 128187e
Hope this helps! :) |
Dupe of #7624 |
Even though this is a dupe I'm going to leave it open since #7647 will close this when it gets merged (and as of now, Travis is passing, so it just needs a review). And sorry for posting a dupe- I'm not sure how I missed 7624. |
Is this really still open? |
This works {
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"my-app": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "app",
"schematics": {
"@schematics/angular:component": {
"styleext": "scss"
}
},
...
}
}
} |
It's sad but on:
ng generate component is still ignoring default settings on angular.json:
Actually it's only happening on "spec" and "styleext". Prefix and directories are working OK. |
On Angular 8 , in my case, this issue is only happening after install @ngxs/schematics. Once this option is removed, ng g component is working fine again. |
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. |
Versions.
Repro steps.
After setting the default....
When I make a new project...
I have a file called app.component.scss with the correct styleUrl in app.component.ts.
However, when I
ng g component my-awesome-component
, I end up with my-awesome.component.css and the equivalent styleUrl in the Typescript file.Desired functionality.
I would like it to respect the settings in .angular-cli.json like
ng new
does.The text was updated successfully, but these errors were encountered: