ngx-rocket / generator-ngx-rocket

:rocket: Extensible Angular 14+ enterprise-grade project generator
https://ngx-rocket.github.io/
MIT License
1.53k stars 218 forks source link

angular-cli generator is creating a wrong style extension #544

Closed Achraf-vermeg closed 4 years ago

Achraf-vermeg commented 4 years ago

I'm submitting a...

Current behavior

ng g c foo is not creating scss style extension.

angular.json

"example": {
    "root": "projects/example",
    "sourceRoot": "projects/example/src",
    "projectType": "library",
    "prefix": "exam",
    "schematics": {
      "@schematics/angular:component": {
        "styleext": "scss"
      }
    },
 ....
}

PS ng config schematics.@schematics/angular:component.styleext scss didn't fixed the issue

ng g c foo --style=scss fixed the issue

Expected behavior

foo.component.scss should be generated by default instead of foo.component.css

Minimal reproduction of the problem with instructions

ng g c foo

Environment


ngx-rocket@8.0.0

Others:

it works fine in version 7

sinedied commented 4 years ago

Thanks for reporting, will look at it. Seems like they changed the angular.json schema without notice :(

"example": {
    "root": "projects/example",
    "sourceRoot": "projects/example/src",
    "projectType": "library",
    "prefix": "exam",
    "schematics": {
      "@schematics/angular:component": {
        "styleext": "scss" // <===== now must be "style": "scss" to work
      }
    },
 ....
}
sinedied commented 4 years ago

:tada: This issue has been resolved in version 8.0.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: