Live data from Hacker News

Closure Compiler: High-level overview of a compilation job

closuretools.blogspot.com

1–10 of 11 posts

Re: Closure Compiler: High-level overview of a compilation job

#4
post #3
post #2

It would be cool if this could be used with standard NPM modules in an easy way.

Would this work for you? https://www.npmjs.com/package/google-closure-compiler

Didn't know it was used so much out of Google, that's a lot of downloads and that just for NPM, I would guess maven and direct downloads are even bigger? not counting clojurescript and scalajs which bundle closure in their compiler.

Re: Closure Compiler: High-level overview of a compilation job

#5
post #4
post #3

Earlier quoted context omitted.

Would this work for you? https://www.npmjs.com/package/google-closure-compiler

Didn't know it was used so much out of Google, that's a lot of downloads and that just for NPM, I would guess maven and direct downloads are even bigger? not counting clojurescript and scalajs which bundle closure in their compiler.

Its not very many. My own package gets way more traffic than that months after I pulled out of NPM.

https://www.npmjs.com/package/prettydiff

Re: Closure Compiler: High-level overview of a compilation job

#6
post #4

Earlier quoted context omitted.

Didn't know it was used so much out of Google, that's a lot of downloads and that just for NPM, I would guess maven and direct downloads are even bigger? not counting clojurescript and scalajs which bundle closure in their compiler.

Its not very many. My own package gets way more traffic than that months after I pulled out of NPM. https://www.npmjs.com/package/prettydiff

True, forgot how big the JS ecosystem is.

Re: Closure Compiler: High-level overview of a compilation job

#7
The closure compiler is one of these engineering secrets that I wish more people knew about. The advanced compilation with dead code elimination [0] is insane. It needs a bit of extra work on top to fully utilise but you get a payoff that you can't achieve with other minifiers.

[0]: https://developers.google.com/closure/compiler/docs/api-tuto...

Re: Closure Compiler: High-level overview of a compilation job

#9
post #7

The closure compiler is one of these engineering secrets that I wish more people knew about. The advanced compilation with dead code elimination [0] is insane. It needs a bit of extra work on top to fully utilise but you get a payoff that you can't achieve with other minifiers. [0]: https://developers.google.com/closure/compiler/docs/api-tuto...

Clojurescript is what introduced me to the Closure compiler. It killed three birds with one stone: it unbloated the client build, saved me from writing validation logic twice in two different languages, and I can stop writing JavaScript.

Re: Closure Compiler: High-level overview of a compilation job

#10

There also an amazing tool[0] that processes TypeScript and adds JSDoc annotations for closure compiler, so it can optimize way much better[1] [0]: https://github.com/angular/tsickle [1]: https://github.com/google/closure-compiler/wiki/Type-Based-P...

How much of a speedup do you get by adding JSDoc type annotations?
Post reply on HN