This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-09-22
Channels
- # 100-days-of-code (1)
- # beginners (51)
- # carry (1)
- # cider (10)
- # clojure (71)
- # clojure-conj (4)
- # clojure-dev (9)
- # clojure-italy (3)
- # clojure-nl (2)
- # clojure-russia (8)
- # clojure-uk (16)
- # clojurescript (42)
- # cursive (4)
- # datomic (2)
- # emacs (8)
- # figwheel-main (7)
- # fulcro (20)
- # hyperfiddle (5)
- # jobs (2)
- # off-topic (16)
- # om-next (4)
- # onyx (9)
- # powderkeg (1)
- # re-frame (8)
- # reagent (17)
- # reitit (41)
- # robots (6)
- # rum (1)
- # shadow-cljs (54)
- # testing (3)
- # tools-deps (19)
I'm still running into instances where it's not picking up my defspec
after switching to the cljs.test/run-all-tests
Hello! I have noticed that https://shadow-cljs.github.io/docs/UsersGuide.html#_repl_2 says to use :devtools {:repl-init-ns my.app
while https://shadow-cljs.github.io/docs/UsersGuide.html#nREPL says to use :nrepl {:init-ns my.repl}
. Are these two the same thing or unrelated? Thanks!
I’m trying to get started with evaluating some code using cljs.js, but for some reason I can’t use any cljs.core vars
this is what I’m doing right now:
(defonce !results (atom nil))
(defn print-results [results]
(reset! !results results))
(cljs/eval-str
(cljs/empty-state)
"(def asdf 1)"
'visual-spec.eval-test
{:eval cljs/js-eval}
print-results)
do I need to call boot/init
on each reload of my code? or is it just called once and then I can keep calling compile-it
?
I’m trying to figure out why I would care how my state is managed based on using the shadow-cljs bootstrapper
did you read https://code.thheller.com/blog/shadow-cljs/2017/10/14/bootstrap-support.html?
> The :bootstrap build itself will generate an “index” with useful information for the compiler.
if your bootstrap support build doesn't change (eg. you don't watch
it) then you probably only need to call boot/init
once
I don't do any self-host development myself so I can't really recommend what the best approach would be
would there be some reason that a build with :module-loader true
and then trying to bootstrap would be incompatible?
what I’m seeing is that if I add a module that depends on shadow.cljs.bootstrap.browser
, it immediately breaks all of my modules
/assets/js/cljs-runtime/shadow.module.main.append.js:4 Uncaught (in promise) TypeError: Cannot read property 'env' of undefined
at eval (/assets/js/cljs-runtime/shadow.module.main.append.js:4)
at eval (<anonymous>)
at Object.goog.globalEval (main.js:2188)
at loadPending (main.js:2957)
at main.js:2990
yep. adding [shadow.cljs.bootstrap.env]
to the requires in my main module immediately fixed all of my modules
Hello! I get this in my trivial browser app, in Chrome Console: > main.js:1 Uncaught ReferenceError: SHADOW_ENV is not defined where main.js is a module compiled by hdow cljs. Any idea why that could be?
Yes, do:
:modules {:shared {:entries []}
:main {:entries [app.main] :depends-on #{:shared}}
:brand {:entries [app.templates.brand] :depends-on #{:shared}}}
(I am trying to create a separate bundle for my "home" page and my "brand" page so each loads faster)
uh, just realized that 🙂 Thanks a lot!
BTW what does
> assets/index.html(please link it to target/index.html) looks like:
in the Begginner Guide mean? Should I ln -s ../assets/index.html
inside target
or what?
@holyjak I can't find that anywhere in the guide? what are you referring to? https://shadow-cljs.github.io/docs/UsersGuide.html?