kevmo
kevmo

Reputation: 757

Why won't PyCharm automatically refresh CSS output files when I am using an SCSS file watcher?

I have configured a PyCharm file watcher that transpiles SCSS (in a SCSS folder) into CSS (in a CSS folder). The CSS files appear to reflect the changes in the SCSS files only when I close and re-open the CSS folder dropdown. How can I make this process automated?

This is what I have in the arguments field: --no-cache --update $FileName$:$ProjectFileDir$/main/static/css/$FileNameWithoutExtension$.css

Screenshot

Upvotes: 2

Views: 2045

Answers (3)

Vladimirs Potapovs
Vladimirs Potapovs

Reputation: 1

  1. console: gem install sass
  2. console: gem install scss
  3. console: gem install compass
  4. console: which scss <--get the path
  5. Pycharm: "Programm" set: path from 4. it could be /usr/local/bin/scss or usr/bin/scss
  6. Pycharm: "Arguments" set: --no-cache --update --force --sourcemap=none --compass $FileName$:$ProjectFileDir$/app-name/static/css/$FileNameWithoutExtension$.css ( be carefull using $Sourcepath variable as mentioned before, it can return depending on the project multiple path path1:path2:path3 and scss do nothing)
  7. Pycharm: "Output paths to refresh" set: $ProjectFileDir$/app-name/static/css/

Upvotes: 0

Elwin
Elwin

Reputation: 860

For future reference: I've published a post here on how to configure the file watcher with SCSS.

http://codeveloped.blogspot.nl/2015/01/pycharm-filewatcher-and-sass-scss.html

Upvotes: 2

Snapper67
Snapper67

Reputation: 131

The Output paths to refresh option is the directory that gets refreshed. It needs to match the output directory you specified in the arguments field $ProjectFileDir$/main/static/css/

Upvotes: 3

Related Questions