I'm using YUI Compressor JS as my file watcher in intellij to minify my javascript files. The compressor works fine when i set 'Arguments' and 'Output path to refresh' parameters like below:
Arguments = $FileName$ -o $FileNameWithoutExtension$.min.js
Output path to refresh = $FileNameWithoutExtension$.min.js
It then produces the minified file in the original file's folder. What I can not achieve here is that I want minified files to be placed in some other directory.
So far I tried to set the two aforementioned parameters with values below:
Arguments= $FileName$ -o $FileParentDir$-min\$FileDirName$\$FileNameWithoutExtension$.min.js
Output paths to refresh = $FileNameWithoutExtension$.min.js
But it then generates the minified version of the javascript file and overwrites it to the original file; prompting me with 'File Cache Conflict' dialoge like below.
File Cache Conflict Dialoge Image
My original javascript files reside in 'webapp/resources/js'
folder, but I want minified files to be generated in 'webapp/resources/js-min'
folder with the same structure as in 'webapp/resources/js'
folder.