How to auto-generate externs for the Google Closure Compiler

Posted by ivo on Stack Overflow See other posts from Stack Overflow or by ivo
Published on 2010-11-24T13:44:26Z Indexed on 2010/12/30 6:53 UTC
Read the original article Hit count: 345

Suppose you are working in a javascript project with several external library dependencies, and want to compile your sources using the Google Closure Compiler in ADVANCED_OPTIMIZATIONS mode.

Since in this mode the compiler will rename your code calls to the external libraries objects and functions, you must provide externs, to prevent this renaming from happening.

But, it is a lot of work to produce the externs by hand, so, what is the best way to auto-generate the appropriate extern from a given javascript lib?

© Stack Overflow or respective owner

Related posts about google-closure

Related posts about google-closure-compiler