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]
# create a new gemset and select it, using the short syntax from rvm rvm use ruby-1.9.3-p374@compass --create # validate that you use the correct gemset rvm gemset list # install compass gem install compass
- Open PHPStorm and select a scss file
- Now PHPStorm will ask if you want to add a FileWatcher
Image may be NSFW.
Clik here to view. - In the following dialog, enter the data:Image may be NSFW.
Clik here to view.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 Image may be NSFW.
Clik here to view.Enjoy.
Thanks @sritterkh
Resource:
[1] rvm
[2] compass