Skip to content

@schematics/angular:component not getting respected when using "defaultCollection": "@ngxs/schematics" #30

Description

@kuncevic

I'm submitting a...


[ x] Bug report  

Current behavior

have "style":"scss" in angular.json

"schematics": {
        "@schematics/angular:component": {
          "style": "scss"
        }
      },

and

 "cli": {
    "defaultCollection": "@ngxs/schematics"
  }

ng g c xyz creating an component with css types of styles instead of scss:

CREATE src/app/xyz/xyz.component.html (22 bytes)
CREATE src/app/xyz/xyz.component.spec.ts (607 bytes)
CREATE src/app/xyz/xyz.component.ts (257 bytes)
CREATE src/app/xyz/xyz.component.css (0 bytes)

Expected behavior

component gets generated with scss styles type

CREATE src/app/xyz/xyz.component.html (22 bytes)
CREATE src/app/xyz/xyz.component.spec.ts (607 bytes)
CREATE src/app/xyz/xyz.component.ts (257 bytes)
CREATE src/app/xyz/xyz.component.scss (0 bytes)

Minimal reproduction of the problem with instructions

ng g my-app --style=scss
ng add @ngxs/schematics
ng g c xyz

What is the motivation / use case for changing the behavior?

respect the angular cli styles config:


"schematics": {
        "@schematics/angular:component": {
          "style": "scss"
        }
      },

Environment

OS: win32 x64
Angular: 7.2.8
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router, service-worker

Package Version

@ngxs/schematics: ^0.0.1-alpha.5
@angular-devkit/architect 0.13.5
@angular-devkit/build-angular 0.13.5
@angular-devkit/build-optimizer 0.13.5
@angular-devkit/build-webpack 0.13.5
@angular-devkit/core 7.3.5
@angular-devkit/schematics 7.3.5
@angular/cdk 7.3.3
@angular/cli 7.3.5
@angular/fire 5.1.1
@angular/flex-layout 7.0.0-beta.23
@angular/material 7.3.3
@angular/pwa 0.13.5
@ngtools/webpack 7.3.5
@schematics/angular 7.3.5
@schematics/update 0.13.5
rxjs 6.4.0
typescript 3.2.4
webpack 4.29.0

For Tooling issues:

  • Node version: v10.14.2
  • Platform: Mac, Windows

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions