开发者

RubyMine Support for SASS

I'm wondering if anyone开发者_JAVA百科 has managed to integrate SASS into their RubyMine environment, and if so, how they managed to configure it? I'm a little confused, because although there is a SASS plugin by default in RubyMine, I don't seem to be able to use SCSS files in my project.

Presently what I do is open up a Terminal window in my SCSS directory and run the standard sass --watch source:destination command to monitor and rewrite my SCSS files to CSS. This works OK, but I'd feel a lot smarter if I could figure out how to configure the RubyMine IDE to add it as a run-able service.

My guess is that it has something to do with the Run / Edit Configurations menu, which would add it as a run-able service like Spork and Rspec, but I'm not certain what I would actually configure that to work properly (or if that's even the right way to do it).

Any thoughts?


OK, 45 minutes of experimentation later and it's all figured out. First, you need to know the EXACT command you intend on running in SASS, so if you plan to monitor multiple directories or something else using multiple arguments, test it in a command line for functionality first. Then:

  1. Click menu Run / Edit Configurations
  2. Click Ruby, then the little + button to create a new Ruby configuration
  3. Fill in the dialog boxes using the following template:

Ruby Script: /Users/username/.rvm/gems/ruby-1.9.2-p180@global/bin/sass

Script Arguments: --watch sourcedir1:destinationdir1 --watch sourcedir2:destinationdir2

Working Directory: /my_rails_project/public/stylesheets

Ruby Arguments: -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)

Notes: I just used the default Ruby Arguments, and I didn't put any environmental variables in. Works like a champ.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜