Closed viebel closed 8 years ago
I'd like to test javascript code with doo.
javascript
doo
The trick I thought about was to include the javascript file as a :preamble. Like this:
:preamble
(defproject js-test-in-cljs "0.0.1" :description "Test Javascript code in clojurescript" :dependencies [[org.clojure/clojure "1.8.0"] [org.clojure/clojurescript "1.9.36"]] :plugins [[lein-doo "0.1.6"]] :source-paths ["src"] :cljsbuild {:builds {:test {:source-paths ["src"] :compiler {:main "js-test-in-cljs.test.runner" :preamble ["main.js"] :optimizations :simple :output-to "resources/public/test/js/testable.js" :output-dir "resources/public/test/js"}}}}})
The problem is that :preamble is not supported in :optimizations :none. And it cause the auto build of lein doo to be a bit slow (around 7 seconds).
:optimizations :none
lein doo
Is there a better way to include javscript file with doo?
javscript
Hi @viebel ,
Can you check if using :foreign-libs as explained in #25 solves your issue?
:foreign-libs
It works like a charm!
Great! I should document this then (#112)
I'd like to test
javascript
code withdoo
.The trick I thought about was to include the
javascript
file as a:preamble
. Like this:The problem is that
:preamble
is not supported in:optimizations :none
. And it cause the auto build oflein doo
to be a bit slow (around 7 seconds).Is there a better way to include
javscript
file withdoo
?