Skip to content

Commit 0af1d0c

Browse files
system-repl: portal namespace for REPL workflow
1 parent f448069 commit 0af1d0c

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Portal
2+
3+
Start Portal and capture all evaluation results over nrepl when portal middleware included, via `:repl/reloaded` or `:dev/reloaded` aliases from [Practicalli Clojure CLI Config](https://practical.li/clojure/clojure-cli/practicalli-config/).
4+
5+
Optionally supply a [portal theme](https://cljdoc.org/d/djblue/portal/0.37.1/doc/ui-concepts/themes).
6+
7+
!!! EXAMPLE "Start Portal listening to all evaluations"
8+
```clojure title="dev/portal.clj"
9+
(ns portal
10+
(:require
11+
[portal.api :as inspect]))
12+
13+
(def instance
14+
"Open portal window if no portal sessions have been created.
15+
A portal session is created when opening a portal window"
16+
(or (seq (inspect/sessions))
17+
(inspect/open {:portal.colors/theme :portal.colors/gruvbox})))
18+
19+
;; Add portal as tapsource (add to clojure.core/tapset)
20+
(add-tap #'portal.api/submit)
21+
```
22+
23+

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ nav:
134134
- Writing Tips: introduction/writing-tips.md
135135
- Service REPL Workflow:
136136
- service-repl-workflow/index.md
137+
- Portal: service-repl-workflow/portal.md
137138
- Aero: service-repl-workflow/aero.md
138139
- Integrant:
139140
- service-repl-workflow/integrant/index.md

0 commit comments

Comments
 (0)