HTML and CSS Reference
Listing 15.87 Installing Juicer and YUI Compressor
$ gem install juicer
$ juicer install yui_compressor
Run from the root of the Node.js application, the command in Listing 15.88 will
produce a single file, chat.min.js , containing the entire client-side application.
Listing 15.88 Using Juicer to compress files
juicer merge -s -f -o public/js/chat.min.js \
Served with gzip compression, the total download should be about 5kB.
Juicer is also able to find dependencies declared inside script files, meaning that
we can jot down each file's dependencies inside comments in them and then simply
run “juicer merge chat.js” to produce the complete file, including the dependencies.
More information on Juicer is available from the topic's website. 4
In this chapter we have been able to pull together a lot of the code developed
based chat application. And we did it all using test-driven development, right from
the very start.