-1

I am new to Closure Compiler and when I compile a library I have to work with, a line like this intrigues me:

   [jscomp] Compiling 197 file(s) with 41 extern(s)

I'd say some common Web variables like document and window are in, but do I have a way to see this list? java -jar compiler.jar --help didn't give me a hint to such an option. That option should output a list like the following:

  • document (from gecko_dom.js)
  • window (from gecko_dom.js)
  • ...

with a total of exactly 41 items. The "(from..." is optional but of course good to have.

kennyluck
  • 89
  • 1
  • 3
  • The 41 externs are 41 files used as externs in the compilation - not 41 types. There are hundreds of types. There is no option in the compiler to list the extern types. – Chad Killingsworth Jul 03 '13 at 19:04

2 Answers2

0

By default, closure-compiler uses all of the externs in this folder: https://code.google.com/p/closure-compiler/source/browse/#git%2Fexterns

They are packaged as part of the compiler jar.

Additional externs are available at https://code.google.com/p/closure-compiler/source/browse/#git%2Fcontrib%2Fexterns but must be manually included with the --externs flag.

Chad Killingsworth
  • 14,360
  • 2
  • 34
  • 57
0

The definitive list of default externs is listed in the command-line runner source:

https://code.google.com/p/closure-compiler/source/browse/src/com/google/javascript/jscomp/CommandLineRunner.java#868

John
  • 5,443
  • 15
  • 21
  • Yes, that's a useful list, but of course I'd rather not manually check in each file and see waht these 41 externs are. – kennyluck Jul 03 '13 at 02:53
  • @kennyluck I'm really not sure what you are asking then. The default externs are divided into separate files because they are too big to be manageable in a single file. – Chad Killingsworth Jul 03 '13 at 13:26
  • @ChadKillingsworth I want Closure list those 41 externs. I have change my question to be more explicit. I hope that's clear now. And of course you are welcome to change the question further as I am not really sure why my question would be interpreted into a request for all **possible** externs. – kennyluck Jul 03 '13 at 18:12