3732624
Branches > main > 3732624 > files
Use the new Clojure CLI REPL
Commit: 37326249e4aa01cb3191fb24acfa5c3ab2fa6a64
Parent: 8c453b5
3 changed files:
README.md view file
@@ -1,8 +1,8 @@ Server written for the 26.3 Minecraft client (https://grahp.dev/bowmap) -Run with `clj -X:dev` to start the server and a REPL.+Run with `clojure -X:dev` to start the server and a REPL. -Test with `clj -X:test`.+Test with `clojure -X:test`. No Minecraft code or data was used in this project, and it is not reliant on extraction of the Minecraft server jar, or on the vanilla/extracted data. deps.edn view file
@@ -3,8 +3,8 @@ {:run {:exec-fn net.bowmap.server.core/-main} :dev {:extra-paths ["dev" "classes"] :exec-fn dev/-main- :extra-deps {nrepl/nrepl {:mvn/version "1.7.0"}}}- :test {:extra-paths ["test"]+ :extra-deps {io.github.clojure/clojure-cli.repl-server {:mvn/version "0.1.1"}}}+ :test {:extra-paths ["test" "classes"] :extra-deps {io.github.cognitect-labs/test-runner {:git/tag "v0.5.1" :git/sha "dfb30dd"}} :main-opts ["-m" "cognitect.test-runner"]dev/dev.clj view file
@@ -1,11 +1,10 @@ (ns dev) (defn -main- "Ahead-of-time compiles the server (and its deps), starts a REPL, and calls- the main fn."+ "Compiles and caches the server and its deps, starts the server and a REPL." [& args]+ (println "Dev: Starting server...") (compile 'net.bowmap.server.core)- (let [start-server (requiring-resolve 'nrepl.server/start-server)- main (resolve 'net.bowmap.server.core/-main)]- (spit ".nrepl-port" (req! (start-server) :port))- (apply main args)))+ (future (apply (resolve 'net.bowmap.server.core/-main) args))+ (compile 'clojure-cli.repl.server)+ ((resolve 'clojure-cli.repl.server/-main) "repl"))