Languages
[Edit]
EN

SCSS - compile and minify to css file

10 points
Created by:
Saim-Mccullough
688

In this short article, we want to show how to compile and compress *.scss files with scss command.

Quick solution:

sass "input_file.scss:output_file.min.css" --style compressed

or:

sass --watch "input_file.scss:output_file.min.css" --style compressed

 

Note: under Windows, sometimes it is necessary to use npx command or full scss path.

So you can run: npx sass "input_file.scss:output_file.min.css" --style compressed

sass path under Windows 10 is: /c/Users/MY_USER_NAME/AppData/Roaming/npm/sass.

Result screenshot:

scss file compilation with compression using scss command (file was compressed about 65%)
scss file compilation with compression using scss command (file was compressed about 65%)

See also

  1. SASS / SCSS - installation path under windows 10

  2. LESS / CSS - minify css file

Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

Web resources compression / minify (JS, CSS)

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join