ialexivy / vscode-angular2-files

vscode extension generating angular files with angular cli
MIT License
61 stars 36 forks source link

Allow customization for scss #53

Closed ElesGergo closed 4 years ago

ElesGergo commented 4 years ago

I would be nice if there would be settings where we could decide the style format of the component.

albancho commented 4 years ago

Same problem here.
angular.json specifies a config which is not took into account by the plugin:

  "schematics": {
    "@schematics/angular:class": {
      "skipTests": true
    },
    "@schematics/angular:component": {
      "prefix": "app",
      "style": "scss"
    },
    "@schematics/angular:directive": {
      "prefix": "app"
    }
  }

So I have to rename the css file to scss, then change its reference in the component (css to scss), and delete the spec file...

jerone commented 4 years ago

Run the following in your command line:

ng config schematics.@schematics/angular:component.styleext scss
albancho commented 4 years ago

Indeed, it adds the styleext line to angular.json, and it works:

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

Thank you @jerone !

Any clue for the "skipTest" to be applied too ?

ialexivy commented 4 years ago

This happened because the angular team have changed the name of style extension from styleext to style, I have added support for style in angular.json 1.6.3 version, please update to the new version, if you want to customize please set appropriate config in angular.json