portal A clojure tool to navigate through your data. The portal UI can be used to inspect values of various shapes and sizes. The UX will probably evolve over time and user feedback is welcome! For an in-depth explanation of the UI, you can jump to the [UI][ui-concepts] docs. Demo To get an overview of the Portal UI and workflow, checkout the following recording of a [live demo][live-demo] I gave for [London…
;; for node and jvm
(require '[portal.api :as p])
;; for web
;; NOTE: you might need to enable popups for the portal ui to work in the
;; browser.
(require '[portal.web :as p])
(def p (p/open)) ; Open a new inspector
;; or with an extension installed, do:
(def p (p/open {:launcher :vs-code})) ; jvm / node only
(def p (p/open {:launcher :intellij})) ; jvm / node only
(add-tap #'p/submit) ; Add portal as a tap> target
(tap> :hello) ; Start tapping out values
(p/clear) ; Clear all values
(tap> :world) ; Tap out more values
(prn @p) ; bring selected value back into repl
(remove-tap #'p/submit) ; Remove portal from tap> targetset
(p/close) ; Close the inspector when done
(p/docs) ; View docs locally via Portal - jvm / node only
[!WARNING]
Portal will keep objects from being garbage collected until they are cleared
from the UI.
评论