On Friday, 31 May 2013 at 17:26:16 UTC, Andrei Alexandrescu wrote:
On 5/31/13 1:17 PM, w0rp wrote:
I recommend YUI Compressor.
http://yui.github.io/yuicompressor/ I use it
for compressing JavaScript and CSS at my job, and it works
very well.
(It's also part of a Maven build script at my job, which is
also cool.)
If you use it, I recommend --nomunge --preserve-semi
--disable-optimizations so it doesn't do any JavaScript
fiddling beyond
just minification.
Thanks. I'm a bit weary of adding Java as a requirement for
building. Is that a legitimate concern?
Andrei
Well, some requirement must be added as I'm unaware of good
minifiers that do not require a runtime. But I would always go
with Node.js instead of Java.
IMHO these days to be serious web developer you must have Node.js
installed, as NPM modules have become de facto standard for
distributing libraries and utilities for web development.
For Node.js minifiers I recommend uglify.js
(https://github.com/mishoo/UglifyJS2) for JavaScript and
clean-css (https://github.com/GoalSmashers/clean-css) for CSS.
And for server configuration take a look at
https://github.com/h5bp/server-configs