Use the file watch function from PHPStorm on Mac OS X

By | 13/04/2013

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.

  1. Create a new gemset using rvm [1] and install compass [2]
  2. Open PHPStorm and select a scss file
  3. Now PHPStorm will ask if you want to add a FileWatcher
    filewatcher
  4. In the following dialog, enter the data:filewatcher1:  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
  5. Thats all. Enjoy.

Thanks @sritterkh

 

Resource:

[1] rvm

[2] compass