angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Feature Request: ng generate --sass Flag To Generate SCSS File

Open griffiti opened this issue 10 years ago • 4 comments

It would be nice to have a --sass flag to use with ng generate to create a .scss file instead of a .css file for a given component.

ng generate component user-list.component --sass

griffiti avatar Jun 23 '16 04:06 griffiti

@griffiti You know there is a possibility to set the default style extension inside the 'angular-cli.json' file.

styleExt: 'scss' for example, if you do that it will generate a .scss file instead of a .css file with the generation of a component or route for example.

masaanli avatar Jul 06 '16 18:07 masaanli

use ng set defaults.styleExt scss

gfrSE avatar Aug 16 '16 06:08 gfrSE

I'm closing this issue because the answers given here seem to cover the usecase, and I don't see a big need to support it on the ng generate component command.

It doesn't sound common enough that a user would have a default on angular-cli.json and then use a few different preprocessors elsewhere in the app.

filipesilva avatar Aug 23 '16 01:08 filipesilva

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.