diff --git a/assets/js/game-runner.cljs.edn b/assets/js/game-runner.cljs.edn new file mode 100644 index 0000000..7638582 --- /dev/null +++ b/assets/js/game-runner.cljs.edn @@ -0,0 +1,2 @@ +{:require [zetawar.game-runner] + :compiler-options {:target :nodejs}} diff --git a/build.boot b/build.boot index 2ec3824..d12797c 100644 --- a/build.boot +++ b/build.boot @@ -3,7 +3,7 @@ :resource-paths #{"assets"} :dependencies '[;; Dev - [adzerk/boot-cljs "1.7.228-2" :scope "test"] + [adzerk/boot-cljs "2.0.0" :scope "test"] [adzerk/boot-cljs-repl "0.3.3" :scope "test"] [adzerk/boot-reload "0.5.1" :scope "test"] [binaryage/devtools "0.9.1" :scope "test"] @@ -134,6 +134,14 @@ (codox :name "Zetawar" :language :clojurescript) (target :dir (when target-dir #{target-dir})))) +(deftask build-game-runner + "Build Zetawar CLI game runner." + [] + (comp (cljs :ids ["js/game-runner"] + :optimizations :simple + :source-map true) + (target))) + (deftask dev "Run Zetawar dev environment." [_ reload-host HOST str "Reload WebSocket host" diff --git a/src/cljs/zetawar/game_runner.cljs b/src/cljs/zetawar/game_runner.cljs new file mode 100644 index 0000000..33d2a05 --- /dev/null +++ b/src/cljs/zetawar/game_runner.cljs @@ -0,0 +1,11 @@ +(ns zetawar.game-runner + (:require + [cljs.nodejs :as nodejs] + [zetawar.game])) + +(nodejs/enable-util-print!) + +(defn -main [& args] + (println "Hello from the Zetawar game runner!")) + +(set! *main-cli-fn* -main)