Sass --watch

Last Updated:

Sass --watch

The watch flag tells Sass to watch your source files for changes, and re-compile CSS each time you save your Sass.

Individual file

To watch individual file changes, you'd just add the watch flag to your command, like so:

Note: Any changes that are saved in basic.scss will affect basic.css file by the following command.

Command Prompt
sass --watch scss/basic.scss css/basic.css

Individual folder

To watch file changes inside individual folder, you'd just add the watch flag to your command, like so:

Note: Any changes to any file under the scss folder that is saved will affect the css folder by the following command.

Command Prompt
sass --watch scss:css

Share this Page

Meet the Author