This library provides tool for visualization application state while
developing ClojureScript-based projects with
Pedestal. In browser, press Ctrl+I
and see current information model in popup window:
Currently, it visualizes:
- Data model
Leiningen coordinates:
[ilshad/pedestal-introspector "0.2.0"]
Step One: Create introspector with app in start.cljs
:
(ns myapp.start
(:require ...
[ilshad.pedestal-introspector :as introspector]
...))
(defn ^:export main []
(let [app (create-app (render-core/render-config))]
(introspector/create app)))
Step Two: Enable keyboard shortcut somewhere in rendering code. For example:
(ns myapp.rendering
(:require ...
[ilshad.pedestal-introspector :as introspector]
...))
(defn render-main [_ _ _]
...
(introspector/bind-key)
...
)
(defn render-config []
[[:node-create [:main] render-main]
...
])
By default, keybinding is Ctrl+I
. Press it in browser while working
with Development Aspect and see curent information model.
(added in 0.2.0) Big trees' rendering are too slow in the introspector's
window. It can be annoying. Use keyword argument exclude
with vector
of vectors - paths in the data model:
(introspector/create app :exclude [[:stream :contexts]
[:stream :indexes]
[:contexts-menu]])
Instead of keyboard shortcut, you can call popup window manually. Type in JavaScript console:
ilshad.pedestal_introspector.open()
Or call (ilshad.pedestal-introspector/open)
somewhere in ClojureScript.
There are CSS bugs in Firefox. Google Chrome is only supported currently.
Copyright © 2013 Ilshad Khabibullin.
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.