Can anyone tell me how to compile sass into css automatically?

Issue

I had to rewrite this every time I want to see a live preview.

sass stylesheet.scss stylesheet.css

Solution

I use sass --watch stylesheet.scss:stylesheet.css. When saving your .scss file, it’ll automatically update the .css file.

You might also consider sass --watch stylesheet.scss:stylesheet.css --style expanded --sourcemap=none to keep the .css file readable.

I’d recommend the Sass Workflow class on Udemy.

Answered By – Ashley Johnson

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published