lewisje / svgweb

Automatically exported from code.google.com/p/svgweb
Other
0 stars 0 forks source link

get svg.js even more compressed with Google's closure compiler #472

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
for the latest release (svgweb-2010-04-09-dracolisk) filesizes of svg.js are as 
follows:

svg.js uncompressed : 332 kB
svg.js as released:     127 kB 
svg.js closure compiled: 90 kB

currently I just drop this URL

http://svgweb.googlecode.com/svn/trunk/src/svg.js

manually into the closure compiler 

http://closure-compiler.appspot.com/home

like so

// ==ClosureCompiler==
// @compilation_level SIMPLE_OPTIMIZATIONS
// @output_file_name svg.js
// @code_url http://svgweb.googlecode.com/svn/trunk/src/svg.js
// ==/ClosureCompiler==

maybe this can be somehow included in the makefile or otherwise be automated.

also beware that the closure compiler throws two warnings on the code and that 
there are advanced 
compression methods that reduce file size even further but breaking the code 
though.

Original issue reported on code.google.com by mneu...@gmail.com on 13 Apr 2010 at 6:17

GoogleCodeExporter commented 8 years ago
Fixed in r1144:
Issue 472; Use Google closure compiler for greater compression.
Thanks for the tip Michael Neutze.

Tested various samples, ran flip card tests for both test_js1.html and 
test_js2.html
and noticed no differences. 

Reduces svg.js by 30K versus the YUI compressor.

Original comment by grick23@gmail.com on 29 May 2010 at 8:24