Closure Compiler project ported to TypeScript

Topics: General
May 29, 2014 at 3:48 PM
Edited May 29, 2014 at 3:53 PM
I thought I would share: I have just finished porting a project from Closure Compiler to TypeScript 1.0.1.

Project class count: 131
(not counting goog, jQuery, etc.)


Compile time: 7 s (down from 56 s)
(Grunt + TypeScript + uglifyJS2 vs. Ant + Closure Linter + ADVANCED_OPTIMIZATIONS)

Gzipped output file size: 36 KB (up from 30 KB)

Not gzipped output file size: 181 KB (up from 96 KB)

Source line count: 8,226 (down from 12,722)

Source files' size: 269 KB (down from 362 KB)

Of course I had to implement some of the functionality in goog, but those files are not part of the above stats.

The port is of equivalent functionality. Mostly the class syntax has changed, and I have removed all the type comments, but kept function contents intact.