Skip to content

Commit

Permalink
Adding CLI game runner placeholder code
Browse files Browse the repository at this point in the history
  • Loading branch information
djwhitt committed Jul 10, 2017
1 parent 489f8a0 commit 6c3f8df
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
2 changes: 2 additions & 0 deletions assets/js/game-runner.cljs.edn
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{:require [zetawar.game-runner]
:compiler-options {:target :nodejs}}
10 changes: 9 additions & 1 deletion build.boot
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down Expand Up @@ -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"
Expand Down
11 changes: 11 additions & 0 deletions src/cljs/zetawar/game_runner.cljs
Original file line number Diff line number Diff line change
@@ -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)

4 comments on commit 6c3f8df

@tbeddy
Copy link
Contributor

@tbeddy tbeddy commented on 6c3f8df Jul 10, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will the game runner be ready for the July release?

@djwhitt
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe, but I doubt it. I'm thinking of the July release as mostly focused on getting existing functionality out. While the next release (August?) will be more forward looking (docs + tests + architecture).

@djwhitt
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That said, I'm very motivated to get this working because I think it'll help quite a bit with testing.

@tbeddy
Copy link
Contributor

@tbeddy tbeddy commented on 6c3f8df Jul 10, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank for the info. I just wanted to confirm since you're putting this in the master branch and I didn't know if that meant you wanted to get it out the door soon.

Please sign in to comment.