HTML and CSS Reference
In-Depth Information
Now, if you run grunt within your project by simply typing grunt at the command line,
grunt returns a log like the one in Figure 4-7 . As you can see in the example log, grunt
lists where the JavaScript lint fails. In addition, because this example bypassed the lint
process by using grunt -force , grunt was able to continue minifying the files and
display the before and after size of the files.
Figure 4-7. Running grunt from the command line
Two more multipurpose tools useful for minifying are Jawr and Ziproxy.
Jawr is a tunable packaging solution for JavaScript and CSS that allows for rapid devel‐
opment of resources in separate module files. You can work with a large set of split
JavaScript files in development mode, then Jawr bundles them all together into one or
several files in a configurable way. By using a tag library, Jawr enables you to use the
same, unchanged pages for development and production. Jawr also minifies and com‐
presses the files, resulting in reduced page load times. You can configure Jawr using a
simple .properties descriptor. Besides standard Java web applications, it can also be
used with Facelets and Grails applications.
Ziproxy ( http://ziproxy.sourceforge.net ) is a forwarding, noncaching, compressing
HTTP proxy targeted for traffic optimization. It minifies and optimizes HTML, CSS,
and JavaScript resources, plus recompresses pictures. Basically, it squeezes images by
converting them to lower quality JPEGs or JPEG 2000 and compresses (via GZIP) HTML
and other text-like data. In addition, it provides such features as preemptive hostname
resolution, transparent proxying, IP ToS marking (QoS), Ad-Blocker, detailed logging,
and more. Ziproxy does not require client software and provides acceleration for any
web browser on any OS.
 
Search WWH ::




Custom Search