diff --git a/docs/01-Development-Environment.md b/docs/01-Development-Environment.md index 2e457d7f3..641cc64de 100644 --- a/docs/01-Development-Environment.md +++ b/docs/01-Development-Environment.md @@ -67,8 +67,19 @@ additional tasks. ### Frontend ### The frontend build process and the http server is located on the tmux -**window 1**. **Figwheel** is used for build and serve the forntend -code. For more information, please refer to `02-Frotend-Guide.md`. +**window 1**. **Shadow-cljs** is used for build and serve the frontend +code. For more information, please refer to `02-Frontend-Developer-Guide.md`. + +By default the **window 1** executes the shadow-cljs watch process, that starts +a new JVM/Clojure instance if there is no one running. But you may also execute +`shadow-cljs server`, that starts only the instance. And then, open another +window with `Ctrl+c` and execute `shadow-cljs watch main` there. This way, the +process that watches and recompiles connects to it and it restarts faster when +your code changes. + +Finally, you can start a REPL linked to the instance and the current connected +browser, by opening a third window with `Ctrl+c` and running +`shadow-cljs cljs-repl main`. ### Backend ### diff --git a/frontend/tools.clj b/frontend/tools.clj index 24d49b9fe..94bd8bf4d 100644 --- a/frontend/tools.clj +++ b/frontend/tools.clj @@ -3,7 +3,6 @@ '[clojure.java.io :as io] '[clojure.edn :as edn] '[clojure.string :as str] - '[figwheel.main.api :as figwheel] '[environ.core :refer [env]]) (require '[cljs.build.api :as api] '[cljs.repl :as repl] @@ -180,34 +179,6 @@ start-watch)))] (trampoline start-watch))) - -;; --- Figwheel Config & Tasks - -(def figwheel-builds - {:main {:id "main" - :options (merge default-build-options main-build-options)} - ;; :worker {:id "worker" - ;; :options (merge default-build-options worker-build-options)} - }) - -(def figwheel-options - {:open-url false - :pprint-config false - :load-warninged-code false - :auto-testing false - :reload-dependents true - :reload-clj-files true - :css-dirs ["resources/public/css"] - :ring-server-options {:port 3449 :host "0.0.0.0"} - :watch-dirs ["src" "test" "../common"]}) - -(defmethod task "figwheel" - [& args] - (figwheel/start - figwheel-options - (:main figwheel-builds) - #_(:worker figwheel-builds))) - ;;; Build script entrypoint. This should be the last expression. (task *command-line-args*)