File tree Expand file tree Collapse file tree 4 files changed +18
-6
lines changed Expand file tree Collapse file tree 4 files changed +18
-6
lines changed Original file line number Diff line number Diff line change 1
1
(ns viewers.viewer-lib
2
2
#? (:cljs (:require [nextjournal.clerk :as clerk]
3
- [foo.bar :as-alias foo])))
3
+ [foo.bar :as-alias foo]
4
+ [cljs.core :as c]
5
+ [clojure.math :as math1]
6
+ [cljs.math :as math2]
7
+ [clojure.pprint :as pp])))
4
8
5
9
#?(:cljs `foo/x)
6
10
7
11
#?(:cljs (defn my-already-defined-function [x]
8
12
[:div
9
13
" Inspected value :)"
10
- [:div [clerk/inspect x]]]))
14
+ (str (cljs.core/inc (math2/floor (math1/floor 1.2 ))))
15
+ [:div [clerk/inspect x]]
16
+ [:div (with-out-str (pp/pprint (range 20 )))]]))
Original file line number Diff line number Diff line change 7
7
org.clojure/clojurescript {:mvn/version " 1.11.132" }
8
8
io.github.babashka/sci.nrepl {:mvn/version " 0.0.2" }
9
9
reagent/reagent {:mvn/version " 1.2.0" }
10
- io.github.babashka/sci.configs {:git/sha " 0702ea5a21ad92e6d7cca6d36de84271083ea68f "
10
+ io.github.babashka/sci.configs {:git/sha " 8253c69a537bcc82e8ff122e5f905fe9d1e303f0 "
11
11
:exclusions [org.babashka/sci]}
12
12
io.github.nextjournal/clojure-mode {:git/sha " 1f55406087814a0dda6806396aa596dbe13ea302" }
13
13
thheller/shadow-cljs {:mvn/version " 2.23.1" }
Original file line number Diff line number Diff line change 17
17
cljs.math
18
18
cljs.repl
19
19
clojure.core
20
+ cljs.core
20
21
clojure.edn
21
22
clojure.math
22
23
clojure.repl
46
47
reagent.core
47
48
reagent.debug
48
49
reagent.ratom
49
- user}))
50
+ user
51
+ clojure.pprint
52
+ cljs.pprint}))
50
53
51
54
(defn- ns-decl?
52
55
" Returns true if form is a (ns ...) declaration."
Original file line number Diff line number Diff line change 38
38
[reagent.ratom :as ratom]
39
39
[sci.configs.applied-science.js-interop :as sci.configs.js-interop]
40
40
[sci.configs.reagent.reagent :as sci.configs.reagent]
41
+ [sci.configs.cljs.pprint :as sci.configs.pprint]
41
42
[sci.core :as sci]
42
43
[sci.ctx-store]
43
44
[sci.nrepl.server :as nrepl]
162
163
" react-dom" react-dom
163
164
" w3c-keyname" w3c-keyname}
164
165
:ns-aliases '{clojure.math cljs.math
165
- cljs.repl clojure.repl}
166
+ cljs.repl clojure.repl
167
+ clojure.pprint cljs.pprint}
166
168
:namespaces (merge {'nextjournal.clerk.viewer viewer-namespace
167
169
'nextjournal.clerk viewer-namespace ; ; TODO: expose cljs variant of `nextjournal.clerk` with docstrings
168
170
'nextjournal.clerk.sci-env {'load-string+
191
193
'nextjournal.markdown.transform)
192
194
193
195
sci.configs.js-interop/namespaces
194
- sci.configs.reagent/namespaces)})
196
+ sci.configs.reagent/namespaces
197
+ sci.configs.pprint/namespaces)})
195
198
196
199
(defn ^:export eval-form [f]
197
200
(sci/binding [sci/ns @last-ns]
You can’t perform that action at this time.
0 commit comments