Closed danielsz closed 9 years ago
There is a better example in the packages project, maybe we should use this one here as well or link to it (that'd also make it easier to maintain).
;; in your build.boot file:
(set-env!
:source-paths #{"src"}
:dependencies '[[adzerk/boot-cljs "0.0-2629-1" :scope "test"]
[cljsjs/boot-cljsjs "0.3.1" :scope "test"]
[cljsjs/react "0.12.2-2"]
[reagent "0.4.3"]]
(require '[adzerk.boot-cljs :refer [cljs]]
'[cljsjs.boot-cljsjs :refer [from-cljsjs]])
(deftask build-dev []
(comp
(from-cljsjs :profile :development)
(cljs :optimizations :none)))
(deftask build-prod []
(comp
(from-cljsjs :profile :production)
(cljs :optimizations :advanced)))
This is much better. A link is fine, too. The main thing is to avoid causing confusion. I understood a little bit more about boot-cljsjs only after seeing how @Deraen used it in https://github.com/Deraen/saapas.
Maybe it'd make sense to annotate the example with things like:
; This will scan jars for files under cljsjs/ and add .inc.js, .ext.js & .lib.js to the fileset
(from-cljsjs :profile :development)
Thanks for your feedback @danielsz, things have been changing fast so documentation might be a bit behind still, please let us know if you discover anything else that should be improved :)
Annotating the example like you demonstrate would be extremely helpful for users new to boot-clj and boot-cljsjs.
Thank you for the library and the good work!
I think it's best to have example on the readme here, things shouldn't change too much in future I think.
Made some changes, let me know what you think.
Looks good. Also: #14
Seriously.
Thanks!