Klikerko
Klikerko

Reputation: 1097

How to automatically synchronize/refresh SCSS/CSS file on change?

Recently my client switched from Eclipse to Intellij. In both IDEs I was editing SCSS files externally and running "compass watch" in terminal. This worked great in Eclipse. immediately after compiling SCSS file I was able to simply refresh browser and see the changes.

In Intellij it takes up to 30 seconds to see the changes, or if I enable "synchronize files on frame activation" I have to switch to browser first, then back to Intellij, and then back again to browser in order to force refresh. Third option is to manually sync "css" folder, which is not convenient. I had a same issue when I was editing and compiling SCSS files in Intellij.

How can I force Intellij to detect CSS file change faster?

Upvotes: 0

Views: 1431

Answers (1)

Klikerko
Klikerko

Reputation: 1097

I've found the solution.

Open "Settings / File Watchers" and go to SCSS. Make sure that field "Output paths to refresh" has the same value for the output as "Arguments" field.

For example, this is my setup:

Arguments:

--no-cache --update $FileName$:$FileParentDir$\css\$FileNameWithoutExtension$.css

Output paths to refresh:

$FileParentDir$\css\$FileNameWithoutExtension$.css

Upvotes: 1

Related Questions