###Emacs live pack for clojure workflow
Start, stop server and switch cljs repl
(add-live-packs "~/.emacs-live-packs/" '("clojure-workflow"))
- Create a file with [dev.clj]
- Define fn with [start stop cljs]
- Key binding {:f9 start :f8 stop :f10 cljs-repl f11 clj-repl }
(ns dev (:require [system :as sys] [cljs.repl.browser] ))
(defonce the-system nil)
(defn start "Start current development system." [] (alter-var-root #'the-system (constantly (sys/system))) (alter-var-root #'the-system server-start ))
(defn stop "stop development system." [] (when the-system (alter-var-root #'the-system (fn [s] (when s (server-stop s) (sys/stop) )))))
(defn cljs-repl [] (cemerick.piggieback/cljs-repl :repl-env (doto (cljs.repl.browser/repl-env :cport 9000) (cljs.repl/-setup))))