mirror of
https://github.com/penpot/penpot.git
synced 2025-01-23 06:58:58 -05:00
📚 Document usage of shadow-cljs in dev environment
This commit is contained in:
parent
f9d29d723c
commit
27527c5540
2 changed files with 13 additions and 31 deletions
|
@ -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 ###
|
||||
|
|
|
@ -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*)
|
||||
|
|
Loading…
Add table
Reference in a new issue