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.
C:\Users\[user]\AppData\Roaming\npm\
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?
Please sign in to leave a comment.
Hi there,
AFAIK, YUI (actual library) and YUICompressor (minifying/optimizing tool) are two different things.
You can get latest version of YUICompressor from https://github.com/yui/yuicompressor/downloads
So ...
You may use nodejs version of yuicompressor ( https://github.com/yui/yuicompressor ) but:
This makes nodejs version of it not really useful for outside-of-nodejs usage.
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!
Well ... technically it should be
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).
The help is very misleading:
http://www.jetbrains.com/phpstorm/webhelp/minifying-css.html
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).