Jack,

You can use the :libs key in the options which are passed to build.

For example, there is a directory of third party libraries in "closure/
library/third_party/closure" which may be pulled in like this:

cljsc src {:libs ["closure/library/third_party/closure"] ...other
options...} > ouptput.js

You may now require things from this library and use the standard
interop mechanisms. The JavaScript files from these libraries will be
pulled into the build process and run through the Closure compiler
with the rest of your code. The library files must conform to the
Google Closure standards and use the Closure dependency system (i.e.
goog.provide and goog.require).

This feature is not documented yet and may change in the future.

As a related issue, if you would like to include third party
ClojureScript files in your project, they only need to be put on the
classpath.

P.S.

js* is not for doing interop. It for implementing nasty stuff at the
very bottom and for temporarily working around problems until
ClojureScript is finished.

On Jul 24, 12:35 pm, Jack Moffitt <j...@metajack.im> wrote:
> I'm exploring clojurescript and wondering how to use an external
> library? In my particular case, I was trying to use Soy from Closure
> Templates.
>
> I realize that arbitrary third party libraries will need to fit into
> the Closure Compiler ways, and part of my exploration is trying to
> port some of my own to them, but my first roadblock was figuring out
> how to get clojurescript to see them at all.
>
> Is there a simple example of this anyone can share? Or a pointer to
> the code would probably help as well.
>
> jack.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to