Skip to content

Commit

Permalink
add macro to run kaocha from cljs cmd line
Browse files Browse the repository at this point in the history
  • Loading branch information
henryw374 committed Dec 8, 2022
1 parent cf46965 commit 7aa80ff
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
8 changes: 5 additions & 3 deletions examples/a-cljs-app/dev/cljs.clj
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@
(util/run-tests)
; start a cljs repl session in the test build. :cljs/quit to exit
(util/repl :browser-test-build)

(util/show-npm-deps)



; do the release build
(app-release)

(util/build-report (app-config) "build-report.html")

; you can stop/start etc as required
(util/stop-server)

)
(util/stop-server))
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
(:require [clojure.test :refer [deftest is testing]]))

(deftest hello-test
(is (= 1 1 )))
(is (= 1 1)))
6 changes: 6 additions & 0 deletions src/com/widdindustries/kaocha_cljs_repl.cljc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
(ns com.widdindustries.kaocha-cljs-repl
#?(:clj (:require [com.widdindustries.tiado-cljs2 :as util])
:cljs (:require-macros [com.widdindustries.kaocha-cljs-repl :refer [run-all]])))

(defmacro run-all []
(util/run-tests))
3 changes: 3 additions & 0 deletions src/com/widdindustries/tiado_cljs2.clj
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@
{:report-file file-name
:inline true}))

(defn show-npm-deps []
(clojure.pprint/print-table (npm-deps/get-deps-from-classpath)))

(comment

server/stop!
Expand Down

0 comments on commit 7aa80ff

Please sign in to comment.