Material schematics doesn't work with configured angular schematics (scss, spec, etc...)
See original GitHub issueBug, feature request, or proposal:
BUG
What is the expected behavior?
When I’ve configured the CLI to use scss and skip tests for generated components, I would expect the material schematics to use already defined configuration when generating components (such as the dashboard).
What is the current behavior?
When I try to create material-dashboard it is created with .css instead of .scss and with .spec file
What are the steps to reproduce?
ng new <project-name> --style=scss --skip-tests
ng add @angular/material@6.2.1 <-- I use 6.2.1 because https://github.com/angular/material2/issues/11836
ng generate @angular/material:material-dashboard --name dashboard
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
"@angular/animations": "^6.0.0",
"@angular/cdk": "^6.2.0",
"@angular/common": "^6.0.0",
"@angular/compiler": "^6.0.0",
"@angular/core": "^6.0.0",
"@angular/forms": "^6.0.0",
"@angular/http": "^6.0.0",
"@angular/material": "^6.2.1",
"@angular/platform-browser": "^6.0.0",
"@angular/platform-browser-dynamic": "^6.0.0",
"@angular/router": "^6.0.0",
"@angular/cli": "~6.0.1",
Is there anything else we should know?
I see that command “ng add @angular/material” add only theme file in angular.json
"styles": [
{
"input": "node_modules/@angular/material/prebuilt-themes/indigo-pink.css"
},
"src/styles.scss"
],
May be that command has to add schematic too?
"schematics": {
"@schematics/material:material-dashboard": {
"styleext": "scss",
"spec": false
},
....
}
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Extend Angular Schematics to customize your development ...
We are running a schematic! We need to link our schematics directory to the Angular project and set it as the default schematics...
Read more >Schematics - Angular Material
The table schematic will create a component that renders an Angular Material <table> which has been pre-configured with a datasource for sorting and...
Read more >Schematics: Add Tailwind CSS to your Angular project
We'll need to do a couple of things to get this working. create webpack config files for dev and production builds. create a...
Read more >Error configuring Universal Angular
I would greatly appreciate your help, the problem is that I have my app with wordpress rest api, but I can not apply...
Read more >Angular CLI SASS options - Stack Overflow
Updating existing project · Use SCSS syntax ng config schematics.@schematics/angular:component.styleext scss · Use SASS syntax ng config schematics.@schematics/ ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
What is the current state? I’m also having the same problem. I only executed two commands:
And I got this error. What is the official solution?
Since 5144aa7, we already respect the
stylext
default option. I will be working on respecting the following supported default options: