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

Created on 23 Jun 2016  路  4Comments  路  Source: angular/angular-cli

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

3 (nice to have)

Most helpful comment

@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.

All 4 comments

@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.

use ng set defaults.styleExt scss

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.

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._

Was this page helpful?
0 / 5 - 0 ratings