Skip to content

Material schematics doesn't work with configured angular schematics (scss, spec, etc...) #11874

@NorDroN

Description

@NorDroN

Bug, 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/[email protected] <-- 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
    },
    ....
}

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions