Setting up YUI watcher

Ok, so last thread I posted got me up and running with a LESS watcher with Node. Now I would like to use YUI for compressing CSS and possibly JS. I have installed YUI via the Node.js console but I can't find where the "program" is for the Watcher.


is where the lassc.cmd file is for a LESS watcher but there is no YUI cmd there.

So how does one get a YUI watcher working under Windows?

Comment actions Permalink

Hi there,

AFAIK, YUI (actual library) and YUICompressor (minifying/optimizing tool) are two different things.

You can get latest version of YUICompressor from

So ...

  1. Download YUICompressor and extract it somewhere.
  2. When creating YUI Watcher -- just point to the extracted jar file in "Program" field
  3. That's it -- as long as you have java on your system it should work just fine (on Windows PhpStorm/WebStorm will use the one that comes bundled with IDE).

You may use nodejs version of yuicompressor ( ) but:

  • I do not think that it has separate command/file for execution from outside of nodejs
  • it still uses java under the hood

This makes nodejs version of it not really useful for outside-of-nodejs usage.

Comment actions Permalink

Perfect! Didn't realise it could be a .jar file as well. Great! Hopefully I can now work out the other Watchers when I need them. Love this IDE!

Comment actions Permalink

Well ... technically it should be

Programm: java.exe
Parameters: -jar path/to/yuicompressor.jar --other_params

But File Watchers plugin is smart enough to accept .jar file in "Program" field and build the correct final command line automatically. This also makes setting up new file watcher entry much easier (especially for those who have never used yuicompressor (and file watcher) before).

Comment actions Permalink

The help is very misleading:

It states that if you install everything with npm, the file watcher will automatically fill in the fields.  Well of course that didn't work for me, so I had no idea where to go.  It seemed very strange that the instructions mentioned a .jar file.  Read it for yourself and see if you are just as confused as I am.

So yes, basically ignore all mentions of npm in the help documentation and just download the .jar file.  This also applies to the Google Closure (I use it to compress my js files).


Please sign in to leave a comment.