0

I am trying to integrate the use of the compass scss framework in intellij. For that I created a new external tool in a group named "My Tools".

Under "Program" I entered the path to the compass.bat file, "Parameters" is "watch". For "Working directory I entered

$ProjectFileDir$\$ModuleName$\src\main\webapp

at first, but this is kind of ugly because the folder with the config.rb is not always in the same directory-structure... Is there any way to enter a Macro for a selected folder in the project tree of IntelliJ so I can start "compass watch" via context menu in the selected folder?

I changed the "Working directory" to "$FilePrompt$" now which is a better solution than the first one, but I still have to point to the directory with the config.rb and I want it to be selected via right click in the Project Tree...

Vortilion
  • 406
  • 2
  • 6
  • 24

1 Answers1

1

$FileDir$ should do the thing You can also try configuring a file watcher for compass - see this thread for details

lena
  • 90,154
  • 11
  • 145
  • 150
  • $FileDir$ won't help because I have to start "compass watch" in the folder containing the config.rb, NOT the scss files (which are in several different folders). – Vortilion Jul 05 '13 at 12:48
  • so what? $FileDir$ will make the directory selected in a project tree a working directory for external tool - isn't it what you are looking for? This work fine for me. My structure is: $project_dir/config - a folder with config.rb; $project_dir/sass - scss files, $project_dir/compiled - css. Tool: program - C:\Ruby193\bin\compass.bat, params - watch, working directory - $FileDir$. Paths in config are set up accordingly. When I right-click the config folder in the project tree and choose my tool from menu, the compass runs fine – lena Jul 05 '13 at 13:47
  • I will test it. Sorry, I got you wrong then, I thought "$FileDir$" always represents the folder where the active file is... Not the selected folder in the project-tree. – Vortilion Jul 05 '13 at 14:44
  • The only thing now is the delayed output in the console... I only see that something has changed, but the output which usually comes after the line "Change detected at .... to: xxx.scss", e.g. "overwrite css/main.css", oder even error messages, are only printed when I make another change. It's like part of the output is appended to the next change, not the one where it should be. – Vortilion Jul 05 '13 at 14:52