File watcher for compass in phpstorm

1.7k views Asked by At

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 ://

2

There are 2 answers

5
Pantelis Peslis On

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

0
Hermann Schwarz On

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$