Current state of automatic generation of externs file for CLJS Advanced Compilation?

123 views
Skip to first unread message

james borden

unread,
Mar 23, 2015, 10:42:40 PM3/23/15
to clo...@googlegroups.com
Is there a way to automatically generate externs files for js libraries for use with the cljs advanced compilation mode? 

I am having problems using a cljsjs package because its extern file does not contain all of the methods of an object I need to complete the introductory tutorial for the js library. My workaround is to create a separate extern file and include the method I need. However, there seems to be many more methods/properties missing from the cljsjs extern file and I would like to just generate a new one and make a pull request.

Is there currently a method someone is using to automatically generate one? It seems tedious and prone to error to generate extern files manually.

Nathan B

unread,
Mar 24, 2015, 10:55:18 AM3/24/15
to clo...@googlegroups.com
We use https://github.com/ejlo/lein-externs for this and it seems to work pretty well for our purposes.

David Nolen

unread,
Mar 24, 2015, 11:16:53 AM3/24/15
to clojure
This is part of the proposed GSoC ClojureScript & Closure project so we're likely to see support for this by sometime this fall.

Dvid

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

james borden

unread,
Mar 25, 2015, 2:10:32 PM3/25/15
to clo...@googlegroups.com

lein-externs is working for me so far, thanks!

james borden

unread,
Mar 25, 2015, 2:23:39 PM3/25/15
to clo...@googlegroups.com
Thanks for all of the work you have done with the development, documentation and promotion of Clojurescript.  Being able to drop in an external js library to project and having it externed by the compiler automatically would be a great feature. Good luck with the GSoC project!
Reply all
Reply to author
Forward
0 new messages