Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular CLI command to skip creating the SCSS file

The following command in Angular CLI generates a new component with 3 files - HTML, TS and SCSS.

ng g c file --skip-import --spec false

I just need the HTML and CSS. I'm already skipping the spec file.. How do I tell it to skip creating the SCSS?

like image 974
zer0 Avatar asked Jun 15 '26 18:06

zer0


2 Answers

Following angular command can be used in the terminal

ng g c something-component --flat -it -is --skipTests


     -is for inline css, preventing style file creation>
     --flat to prevent folder creation
     -it for inline template, preventing html file creation
     --skipTests to prevent .spec file creation

Try one of them as per your requirement

like image 192
Prakash Khadka Avatar answered Jun 17 '26 09:06

Prakash Khadka


You need the option inlne styles, e.g.

ng g c file -is -spec false
like image 42
Yakov Fain Avatar answered Jun 17 '26 09:06

Yakov Fain



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!