Alexis Wilke
Alexis Wilke

Reputation: 20725

Can we create externs from a full .js file with Google Closure Compiler?

I'm wondering whether extern files for the Google closure compiler need to be written by hand. I have not seen anything about the possibility of generating those files from my .js files. It's quite a bit of work to create all the externs by hand and it is error prone too (i.e. wrong parameter definitions as it changes with time...)

So I was wondering whether there was a Linux tool (command line) for that purpose. If not, would there be a way to compare the .js against the extern files so I can at least make sure they are in sync.?

Upvotes: 6

Views: 172

Answers (1)

Tyler
Tyler

Reputation: 22116

http://www.dotnetwise.com/Code/Externs/ aims to do this but I haven't used it myself so I'm not sure how well it works.

We have an issue open to do this as part of the compiler but I don't expect that it will happen anytime soon.

Upvotes: 2

Related Questions