I have what I think is a really nice method for using jquery and other js libs and their dependencies sanely in clojurescript.
(it will be even better if/when
http://dev.clojure.org/jira/browse/CLJS-147 is resolved)
by using wrap-js (
https://github.com/davesann/wrap-js) you can have clojurescript require manage the dependencies for you and insert the scripts into the page on bootstrap.js load. In the right order. no manual effort required.
briefly:
1. just jQuery
clojars [dsann/dsann-cljs-jquery "0.0.1"] ( cljs-jquery was already taken)
(ns my client
(:require [cljs-jquery.inline :as _jq]))
; use js/jQuery here - works - no need to include jquery in your html page
2. Even better: jQuery and plugin
clojars [cljs-jquery-sparkline "0.0.1"]
(ns my client
(:require [cljs-jquery-sparkline.inline :as _sl]))
; use js/jQuery and (.sparkline ($ ...)) here. works - no need to include jquery or the plugin in your html page
3. And:
feel free to use jayq or any other library building apis on top of jquery.
just be sure to require [cljs-jquery.inline :as _jq] before you make reference to jQuery
4. And!
Its really easy to wrap your own libs. 5 minutes and you are away.
see also