Sunday, August 05, 2007

jsmin

My ~/bin/jsmin:

#!/usr/bin/env perl
use JavaScript::Minifier qw(minify);
undef $/;
print minify(input => <>);

JavaScript::Minifier works pretty well. This is used when I'm making opcafe website, I minimized the js lib like this:

opcafe-lib.js: jemplates.js
cat Jemplate.js JSAN.js DOM/Utils.js jemplates.js jquery.js interface.js jquery.rotate.js | jsmin > $@

Labels: , ,


Comments: Post a Comment

Subscribe to Post Comments [Atom]



Links to this post:

Create a Link



<< Home

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]