yes exactly, but I would like to be able to package js libs as jars - not specify them directly to the build in the cljsc opts.
I have done half of this, here: https://github.com/davesann/wrap-js see the following examples: https://github.com/davesann/cljs-bcrypt-wrapper https://github.com/davesann/jayq ( extending to ibdknox/jayq<https://github.com/ibdknox/jayq> ) To complete it, I need a way to specify that the externs file/files provided should used by the compiler. possibly something along the lines of the *require-externs* added below (ns jayq.inline-jquery (:require [wrap-js.core :as wrap-js]) (:require-macros [wrap-js.macros.file-contents :as mfc])) ;; Just require this namespace if you want JQuery inlined and inserted into your webpage. ;; do this before you require jayq.core *;; specify externs for the compiler* *(require-externs "js/jquery-externs.1.7.1.js")* ; inline from local (def jquery-src (mfc/from-local-file "js/jquery.1.7.1.min.js")) (wrap-js/add-inline! jquery-src) The nice thing here is that if you don't require this namespace jquery is omitted from your page and your bootstrap. no compiler options required. Currently though - you must specify the externs to the compiler if using advanced mode. I suspect that the above call may be hard to add - or undesirable. A simple alternative to this would be to use a convention - for example - that the compiler will always read, as an externs file, any js file found on the classpath in "js/externs" D -- 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