File tree 2 files changed +7
-7
lines changed
2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ Start the REPL using the browser as the evaluator:
63
63
``` clj
64
64
(require '[cljs.repl :as repl])
65
65
(require '[cljs.repl.browser :as browser])
66
- (def env (browser/repl-env :root " samples/repl/ " ))
66
+ (def env (browser/repl-env ))
67
67
(repl/repl env)
68
68
```
69
69
Original file line number Diff line number Diff line change 24
24
(def opts {:output-to " samples/repl/main.js"
25
25
:output-dir " samples/repl/out" })
26
26
(build " samples/repl/src" opts)
27
-
27
+
28
28
; ; Start REPL
29
29
(do (require '[cljs.repl :as repl])
30
30
(require '[cljs.repl.browser :as browser])
31
- (def env (browser/repl-env :root " samples/repl/ " ))
31
+ (def env (browser/repl-env ))
32
32
(repl/repl env))
33
-
33
+
34
34
; ; Open the file samples/repl/index.html
35
-
35
+
36
36
; ; Evaluate some basic forms
37
37
(+ 1 1 )
38
38
; ; TODO: Chrome has a problem with keywords
39
39
{:a :b }
40
40
" hello"
41
41
(reduce + [1 2 3 4 5 ])
42
42
(js/alert " Hello World!" )
43
-
43
+
44
44
; ; Can only load files that depend on what is already avaialble.
45
45
(load-file " clojure/string.cljs" )
46
46
(clojure.string/reverse " Hello" )
63
63
; ; depends on another cljs file which has not been compiled?
64
64
(load-file " clojure/browser/dom.cljs" )
65
65
66
- )
66
+ )
You can’t perform that action at this time.
0 commit comments