Skip to content

Commit c7a57e9

Browse files
committed
Show usage
1 parent 5620687 commit c7a57e9

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

notebooks/tap_window.clj

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,15 @@
33
{:nextjournal.clerk/visibility {:code :hide :result :hide}
44
:nextjournal.clerk/no-cache true}
55
(:require [nextjournal.clerk :as clerk]
6-
[nextjournal.clerk.viewer :as v]))
6+
[nextjournal.clerk.tap :as tap]
7+
[nextjournal.clerk.window :as window]))
78

89
(clerk/window! :my-window (clerk/html [:div.w-8.h-8.bg-green-500]))
910

1011
(comment
12+
(clerk/destroy-window! :my-window)
13+
(clerk/destroy-all!)
14+
(clerk/window! ::window/taps)
1115
(tap> (clerk/html [:div.w-8.h-8.bg-green-500]))
12-
(tap> (clerk/plotly {:data [{:x [1 2 3 4]}]})))
16+
(tap> (clerk/plotly {:data [{:x [1 2 3 4]}]}))
17+
(tap/reset-taps!))

src/nextjournal/clerk.clj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@
7272
#_(show! (java.io.StringReader. ";; # In Memory Notebook 👋\n(+ 41 1)"))
7373

7474
(defn window! "todo" [& args] (apply window/open! args))
75-
(defn destroy-window! "todo" [id] (window/destroy! id))
75+
(def destroy-window! "todo" window/destroy!)
76+
(def destroy-all-windows! "todo" window/destroy-all!)
7677

7778
(defn recompute!
7879
"Recomputes the currently visible doc, without parsing it."

0 commit comments

Comments
 (0)