compile sass to css in two ways ( vscode extension - command line )

Hero Code
Hero Code
12.7 هزار بار بازدید - 2 سال پیش - Sass is a stylesheet language
Sass is a stylesheet language that’s compiled to CSS. It allows you to use variables, nested rules, mixins, functions, and more, all with a fully CSS-compatible syntax. Sass helps keep large stylesheets well-organized and makes it easy to share design within and across projects.

If you want to compile your sass codes to css, you have two ways to do this work :

1. Using node.js and sass package and CLI

2. Live sass compiler extension

👇 First way :

For the first way you should download node.js from here 👇👇👇 :

✅ Node.js download Link: https://nodejs.org/en/

After that, you should install it.

Tip: If you want to be sure it has been installed correctly, open your CMD and write " node -v ". If you see the number, it means it has been installed correctly.

After installing node.js, you should install the npm sass package with this command :

npm install -g sass

Now open your folder and also open your CLI and go to your directory. You should write this command to start compiling :

sass --watch name.scss:name.css

And that's it.

If you want to stop compiling just open your CLI again and press Ctrl + C to stop it.

👇 Second way :

If you use the visual studio code (vscode) text editor, you can use live sass compiler extension. You can download it from here 👇👇👇 :

✅ Live sass compiler extension download link: https://marketplace.visualstudio.com/...

When you install this extension, a watch my sass button will appear in the status bar. When you click on it, compiling will start and if you click on it again, it will stop.

🌐 video link: compile sass to css in two ways ( vsc...

🔎 :
#programming
#code
Hero Code,
hero code,
code,
programming,
sass,
sass tutorial,
sass css,
css,
sass compile,
compile sass,
scss,
compile sass to css,
how to compile sass file to css,
how to compile sass file to css unsing npm,
how to compile sass to css in visual studio code,
compile sass to css node,
live sass compiler,
how to use live sass compiler in vscode,
live sass compiler extension,
sass compiler extension,
visual studio code,
vscode extensions,
vs code,
vscode,
vscode extension
2 سال پیش در تاریخ 1401/02/13 منتشر شده است.
12,761 بـار بازدید شده
... بیشتر