There isn't an official way to do this now but you can package a
ClojureScript library (of .cljs files) into a jar and add it to the
classpath. Once on the classpath, the namespaces in the library can
then be required and used just as you would currently use clojure.set
or clojure.string.

ClojureScript finds everything that it needs on the classpath. This
means that you could also package up ClojureScript and it's
dependencies into a single jar and then add it as a dependency to
another project. You can then use the tools from the REPL or write
your own scripts to do compilation.

On Aug 8, 12:09 pm, Eric Merritt <ericbmerr...@gmail.com> wrote:
> Hello All,
>
> Are there any thoughts yet on distributing ClojureScript libraries?
> ClojureScript does whole program optimization, it needs the
> sources. Copying the sources into your main project isn't really a
> solution, not a long term solution at the very least.
>
> At the very least it would be nice of the clojurescript compiler could
> build from multiple locations (I will be embarrased if this is already
> the case). I suspect that ClojureScript is going to get built into to
> various build systems at some point shortly (lein, cake, etc). Then it
> will be a matter of providing some type of package and dependency
> system. Again I suspect very strongly that this is going to piggyback
> on the existing dependency mechenism. I am mostly interested in
> hearing what people are thinking.
>
> Thanks,
> Eric

-- 
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