Haml/SASS Converters for RubyMine IDE (JRuby script-plugin)
Installing
-
Install jruby:
> rvm install jruby-1.5.6 > rvm use jruby
We are not going to use this version of JRuby - RubyMine already has bundled version of it. We need to install it in order to collect all required for this plugin gems.
-
Create and use ‘haml-sass-converters’ gemset:
> rvm use jruby@haml-sass-converters –create
-
Install gem:
> gem i haml-sass-converters
-
Run install script in your project’s root (or some other location) in order to copy script:
> cd <your-project-root> > haml-sass-converters-install
New “scripts” folder will be created with “converters.rb” as a plugin.
-
Go to “File|Setting|Extensions” and add “scripts” folder as new “Script Folder”.
-
Restart RubyMine. After restarting IDE will have new “Css” group under “Tools|Extensions” and new actions:
-
convert Html to Haml;
-
convert CSS to SASS;
You can reach them from “Tools|Extensions” in main menu or from context popup menu inside the editor.
Usage
Select some content inside erb or css file. Right click inside the editor and select appropriate action.