-
-
Notifications
You must be signed in to change notification settings - Fork 501
/
clojurescript-figwheel-experiments.edn
115 lines (100 loc) · 4.73 KB
/
clojurescript-figwheel-experiments.edn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
;; ---------------------------------------------------------
;; Figwheel experiments
;;
;; Attempts to run a ClojureScript terminal REPL with nREPL
;; to connect an Editor e.g. Emacs/Spacemacs, Neovim/Conjure
;;
;; Abandoned approach
;; Recommend either
;; Run figwheel-main project aliases for Rebel realine and use Emacs as an editor (file save triggers reload)
;; Run cider-jack-in-cljs and do everything in the editor
;; ---------------------------------------------------------
{:aliases
{;;
;;
;; Rebel Readline, ClojureScript and Figwheel experiements
;; ClojureScript REPL with basic UI (rlwrap)
;; clojure -M:repl/cljs
;; - use with figwheel alias in figwheel-main template project
:repl/cljs
{:extra-deps {org.clojure/clojurescript {:mvn/version "1.11.60"}
nrepl/nrepl {:mvn/version "1.0.0"}
cider/cider-nrepl {:mvn/version "0.30.0"}
cider/piggieback {:mvn/version "0.5.3"}}
:main-opts ["--main" "nrepl.cmdline"
"--middleware" "[cider.nrepl/cider-middleware,cider.piggieback/wrap-cljs-repl]"
"--interactive"]}
;; Derived from Cider Jack-in command
;; clojure -M:repl/figwheel-headless
;; - check cider will connect to a terminal repl
;; `cider-jack-in-cljs` to start figwheel
:repl/figwheel-headless
{:extra-deps
{nrepl/nrepl {:mvn/version "1.0.0"}
cider/cider-nrepl {:mvn/version "0.30.0"}
cider/piggieback {:mvn/version "0.5.3"}
com.bhauman/figwheel-main {:mvn/version "0.2.18"}}
:main-opts
["-m" "nrepl.cmdline"
"--middleware" "[cider.nrepl/cider-middleware,cider.piggieback/wrap-cljs-repl]"]}
;; Start Rebel and then start nREPL via custom `user` namespace
;; https://figwheel.org/docs/vim.html
;; partially works with older version of cider-nrepl and piggieback, but fails with newer versions
;; - figwheel-main commands mostly work, although not reliably
;; clojure-connect-cljs and select figwheel-main | dev build tries to start the dev build
;; so should not start the figwheel build in the `user` namespace (or write a custom connect type for cider)
:repl/figwheel-rebel
{:extra-paths ["src" "resources" "test" "target"]
:extra-deps
{;; org.clojure/clojure {:mvn/version "1.11.1"}
;; org.clojure/clojurescript {:mvn/version "1.10.773"}
com.bhauman/figwheel-main {:mvn/version "0.2.18"}
com.bhauman/rebel-readline {:mvn/version "0.1.4"}
com.bhauman/rebel-readline-cljs {:mvn/version "0.1.4"}
org.clojure/tools.nrepl {:mvn/version "0.2.13"}
cider/cider-nrepl {:mvn/version "0.30.0"}
cider/piggieback {:mvn/version "0.5.3"}}
:main-opts ["-m" "rebel-readline.main"]}
:repl/figwheel
{:extra-deps {org.clojure/clojurescript {:mvn/version "1.11.54"}
nrepl/nrepl {:mvn/version "1.0.0"}
cider/cider-nrepl {:mvn/version "0.39.0"}
cider/piggieback {:mvn/version "0.5.3"}}
;; com.bhauman/rebel-readline-cljs {:mvn/version "0.1.4"}}
;; Optionally add figwheel-main and rebel readline libraries
:main-opts ["-m" "nrepl.cmdline"
"--middleware [cider.nrepl/cider-middleware,cider.piggieback/wrap-cljs-repl]]"
"--interactive"]}
;; add figwheel-main main-opts
;; "-f" "rebel-readline.cljs.main/-main"
:repl/cljs-figwheel
{:extra-deps {org.clojure/clojurescript {:mvn/version "1.11.60"}
nrepl/nrepl {:mvn/version "1.0.0"}
cider/cider-nrepl {:mvn/version "0.30.0"}
cider/piggieback {:mvn/version "0.5.3"}}
:main-opts ["--main" "nrepl.cmdline"
"--middleware" "[cider.nrepl/cider-middleware,cider.piggieback/wrap-cljs-repl]"
"--interactive"
"-f" "figwheel.main/-main" "-b" "dev" "-r"]}
;; Connects to clojurescript repl, evaluation updates app,
;; Java 11 or earlier - requires Nashorn JavaScript engine in JVM
:repl/nrepl-figwheel
{:extra-deps
{org.clojure/clojurescript {:mvn/version "1.9.946"}
nrepl/nrepl {:mvn/version "0.8.3"}
cider/cider-nrepl {:mvn/version "0.30.0"}
cider/piggieback {:mvn/version "0.5.3"}
org.slf4j/slf4j-nop {:mvn/version "2.0.7"}
;; org.openjdk.nashorn/nashorn-core {:mvn/version "15.4"}
jakarta.xml.bind/jakarta.xml.bind-api {:mvn/version "2.3.2"}
cljs-tooling/cljs-tooling {:mvn/version "0.3.1"}
com.bhauman/rebel-readline-cljs {:mvn/version "0.1.4"}
com.bhauman/figwheel-main {:mvn/version "0.2.18"}}
:extra-paths ["target" "test"]
:main-opts
["--main" "nrepl.cmdline"
"--middleware" "[cider.nrepl/cider-middleware,cider.piggieback/wrap-cljs-repl]"
"--interactive"
"-f" "rebel-readline.cljs.main/-main"]}
:end/aliases {}}
:end/config {}}