This is a short tutorial how you can use the compass watch function that is new in PHPStorm, beginning with creating a gemset for compass and using this for PHPStorm.
- Create a new gemset using rvm [1] and install compass [2]
12345678# create a new gemset and select it, using the short syntax from rvmrvm use ruby-1.9.3-p374@compass --create# validate that you use the correct gemsetrvm gemset list# install compassgem install compass - Open PHPStorm and select a scss file
- Now PHPStorm will ask if you want to add a FileWatcher
- In the following dialog, enter the data:
1: The full path to your compass binary inside the gemset. For example:
/Users/tlayh/.rvm/gems/ruby-1.9.3-p374@compass/bin/compass
2: The argument is “compile“3: Working directory is where you config.rb file is located. Make sure that all data like css_dir and sass_dir and so on is configured there.4: Set environment variable to select the gemset as follows:
GEM_HOME = /Users/tlayh/.rvm/gems/ruby-1.9.3-p374@compass - Thats all. Enjoy.
Thanks @sritterkh
Resource:
[1] rvm
[2] compass
[…] Use the file watch function from PHPStorm on Mac OS X […]