0

i've been lately struggling with phpstorm file watchers. I'm trying to set up a Compass scss file watcher to work with this folder structure

project
    themes
        default-bootstrap
            sass
               modules
               etc
            css
               modules
               etc

As you can see the folders in "sass" folder should be mirrored in "css" folder.I just cant figure out what should I put in arguments, working directory, output path boxes :/ to get it working :/ I've created scope which recursively includes from "default-bootstrap" folder but that's it. I dont know what next :/

For example when I edit some scss file in modules folder I want phpstorm compile it to the css/modules folder. I have ruby, sass and compass installed and configured in phpstorm

Can anyone please help me ? The documentation from Jetbrains is not really helpful here ://

Depka
  • 85
  • 1
  • 13

2 Answers2

0

My SCSS watcher settings based on yous structure:

Scope: Project Files
Program: PATH_TO_COMPASS
Arguments:  --no-cache --update $FileName$:$ProjectFileDir$/themes/default-bootstrap/css/$FileNameWithoutExtension$.css
Working directory: $ProjectFileDir$/themes/default-bootstrap/sass
Output paths to refresh: $ProjectFileDir$/themes/default-bootstrap/css/$FileNameWithoutExtension$.css

$ProjectFileDir$ is equivalent to /home/{username}/{projects_path}/project

Pantelis Peslis
  • 14,930
  • 5
  • 44
  • 45
  • Well this settings lead to this /usr/bin/compass --no-cache --update global.scss:/Users/deepress/Sites/Surfstore-presta 1.6/themes/default-bootstrap/css/global.css Error: invalid option: --no-cache Process finished with exit code 1 – Depka Nov 18 '14 at 23:35
  • Also can you explain to me what does the ":" means in this syntax ? – Depka Nov 18 '14 at 23:45
  • I don't know what does it means, was the default. I'm using the sass-lang.com and the above settings work for me. Try to put this in arguments: compile $FileName$:$ProjectFileDir$/themes/default-bootstrap/css/$FileNameWithoutExtension$.css – Pantelis Peslis Nov 18 '14 at 23:57
  • Tried this but i get "The individual stylesheets must be in the same directory" – Depka Nov 19 '14 at 09:42
  • what does your config.rb looks like? '--no-cache --update' are not valid compass options. I normally use $FilePath$ as 'Arguments' field value – lena Nov 25 '14 at 14:54
0

My SASS watcher settings (working :-)), based on your path structure:

Arguments: --update $FileName$:$ProjectFileDir$/themes/default-bootstrap/css/$FileDirPathFromParent(sass)$$FileNameWithoutExtension$.css

Output paths to refresh: $FileNameWithoutExtension$.css:$FileNameWithoutExtension$.css.map

Working directory: $FileDir$
Hermann Schwarz
  • 1,495
  • 1
  • 15
  • 30