I recently learned Sass and am working on a project. In this project, whenever I change my styles, I open the terminal and type the command sass style.scss style.css to update my CSS file.
Is there a way to automatically update my CSS file without having to type this command every time?
I just want a good solution that work.
I recently learned Sass and am working on a project. In this project, whenever I change my styles, I open the terminal and type the command sass style.scss style.css to update my CSS file.
Is there a way to automatically update my CSS file without having to type this command every time?
I just want a good solution that work.
Share Improve this question edited 10 hours ago bmargulies 100k40 gold badges194 silver badges321 bronze badges asked 10 hours ago Anonymous GhostAnonymous Ghost 12 bronze badges2 Answers
Reset to default 0Typically, people who use sass use some sort of ISE, perhaps combined with a build system. For example, VSCode is aware of SASS.
Eventually, you will have a build pipeline that involved other steps than running SASS that have to happen to prepare your site for deployment, and the system you select and set up will run SASS along with other needed steps. While in early development, however, an IDE is a common solution.
Use the watch mode in Sass to automatically update your CSS file whenever you save changes to your .scss
file.
Run this command in your terminal:
sass --watch style.scss:style.css