This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-11-17
Channels
- # bangalore-clj (4)
- # beginners (60)
- # boot (63)
- # cider (2)
- # cljs-dev (22)
- # cljsrn (3)
- # clojars (32)
- # clojure (133)
- # clojure-gamedev (1)
- # clojure-germany (17)
- # clojure-italy (1)
- # clojure-russia (11)
- # clojure-serbia (16)
- # clojure-spec (35)
- # clojure-uk (75)
- # clojurebridge (1)
- # clojurescript (83)
- # community-development (25)
- # core-async (43)
- # cursive (15)
- # datomic (28)
- # emacs (2)
- # fulcro (108)
- # graphql (5)
- # hoplon (15)
- # lein-figwheel (6)
- # leiningen (39)
- # lumo (106)
- # new-channels (1)
- # off-topic (4)
- # om (26)
- # om-next (53)
- # onyx (46)
- # other-languages (2)
- # perun (1)
- # protorepl (5)
- # re-frame (13)
- # ring (18)
- # ring-swagger (1)
- # rum (6)
- # shadow-cljs (82)
- # spacemacs (19)
- # specter (5)
- # sql (3)
- # test-check (31)
- # unrepl (12)
- # untangled (2)
- # vim (109)
oh nevermind. I had forgotten that I had added a devtools server to one of my other builds š
seeing the list of HTTP servers in the logs and being able to click on them is nice. (one is a test build, the other an ordinary :browser build)
FileNotFoundException target/shadow-node-repl.js (No such file or directory) java.io.FileInputStream.open0 (FileInputStream.java:-2)
when I tried to start shadow-cljs node-repl
Another question: I add :nrepl {:port 8202}
to my shadow-cljs.edn
, but it tells me failed to require macro-ns "cljs.repl", it was required by "cljs.repl"
when I shadow-cljs watch app
The project is here ļ¼ https://github.com/cmal/d3-cljs
@cmal ah doh. should be fixed in [email protected]
. I bumped the closure compiler version yesterday but cljs.closure
(used by cljs.repl
) is not compatible with that.
user> (shadow.cljs.devtools.api/nrepl-select :d3-cljs)
To quit, type: :repl/quit
[:selected :d3-cljs]
cljs.user> (defn hello [who]
(str "Hello, " who "!")
"ret value")
There is no connected JS runtime.
cljs.user> (cemerick.piggieback/cljs-repl :d3-cljs)
There is no connected JS runtime.
cljs.user> (shadow.cljs.devtools.api/nrepl-select :d3-cljs)
There is no connected JS runtime.
cljs.user>
There is no connected JS runtime.
means that you need to open the app in the browser
cljs.user> (defn hello [who]
(str "Hello, " who "!")
"ret value")
There is no connected JS runtime.
There is no connected JS runtime. [:node-repl] Configuring build. [:node-repl] Compiling ... [:node-repl] Build completed. (39 files, 19 compiled, 0 warnings, 10.58s) JS runtime connected.
JS runtime connected.
cljs.user> (defn hello [who]
(str "Hello, " who "!")
"ret value")
There is no connected JS runtime.
cljs.user>
`cljs.user> (shadow.cljs.devtools.api/nrepl-select :node-repl) There is no connected JS runtime.`
note the cljs.user>
prompt. you are already in a CLJS REPL. nrepl-select
ONLY works in CLJ REPLs
cljs.user> :repl/quit
:repl/quit
user> (shadow.cljs.devtools.api/nrepl-select :node-repl)
To quit, type: :repl/quit
[:selected :node-repl]
cljs.user> (defn hello [who]
(str "Hello, " who "!")
"ret value")
#'cljs.user/hello
cljs.user>
Iāll change that behaviour so that you can only nrepl-select when the runtime is already connected
(ns demo.app-test
(:require [cljs.test :refer (deftest is)]))
(deftest some-demo-test
(is (= 1 2)))
@thheller the advanced compilation change sounds great
Btw we are also interested in running the tests, that is the only problem we have now, because currently we use lein doo
=>> yarn
yarn install v1.3.2
[1/4] š Resolving packages...
[2/4] š Fetching packages...
info There appears to be trouble with your network connection. Retrying...
[2/4] š Fetching packages...
verbose 27.931 Performing "GET" request to "".
[################################################] 188/189
Started using shadow-cljs last night. I wish I would have found it sooner! I can suddenly use npm deps that wouldnāt work with :npm-deps
!
One question: is there programmatic access to the Java apis? Iām curious if I can keep the watcher/builder in the same JVM instance as my applicationās REPL (clojure).
beyond that shadow-cljs compile app
is the same as calling (shadow.cljs.devtools.api/compile :app)
I wonder if that would work as a boot task (which can use instantiate separate instances/versions of Clojure through the āpodā abstraction)
I do not recommend boot
at all. they do a bunch of stuff that really get in the way, ie. caching doesnāt work.
but I donāt know much about boot so maybe you can figure it out so it works properly
Yeah, Iām sure that boot could be used, but if its optimized for cli usage, that seems like the place to start
@jiyinyiyong yes it uses babel-core
to transpile ES6 in node_modules
.