This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-11-24
Channels
- # announcements (1)
- # asami (10)
- # aws (1)
- # babashka (1)
- # beginners (105)
- # cider (13)
- # cljsrn (6)
- # clojure (42)
- # clojure-australia (4)
- # clojure-dev (7)
- # clojure-europe (26)
- # clojure-nl (2)
- # clojure-uk (13)
- # clojurescript (19)
- # code-reviews (3)
- # conjure (18)
- # core-async (4)
- # core-matrix (5)
- # cryogen (3)
- # datomic (27)
- # depstar (21)
- # emacs (2)
- # figwheel-main (9)
- # fulcro (18)
- # helix (7)
- # jobs (3)
- # jobs-discuss (15)
- # juxt (7)
- # kaocha (4)
- # lambdaisland (2)
- # leiningen (11)
- # luminus (1)
- # malli (6)
- # meander (9)
- # minimallist (4)
- # mount (3)
- # off-topic (3)
- # pathom (8)
- # pedestal (28)
- # rdf (13)
- # re-frame (7)
- # reagent (5)
- # shadow-cljs (3)
Seems to work in 758 and to break in 764. Probably commit be792c95
in CLJS.
But given that your code explicitly uses target bundle, I don't think it was supposed to work in the first place.
I think that that error is supposed to be related to the :target
passed into the opts
parameter: http://cljs.github.io/api/cljs.js/#eval-str
When I try to require both figwheel-main and cljs in my deps.edn
file, the repl never actually appears.
Possible question for the #beginners channel, but I'm trying to figure out how one would go about executing cljs builds using clojure tools/deps.edn without shadow, lein etc. Something like this (I'm aware of the fact that you can run cljs.main with :main-opts set)
{:paths ["src"]
:deps
{org.clojure/clojurescript {:mvn/version "1.10.758"}}
:aliases
{:build/release
{:exec-fn cljs.build.api/build
:exec-args {:src "src" :opts {:optimizations :advanced} } }}}
I am trying to build a browser based cljs evaluator against which tests assertions could be run. So essentially I want to run tests against the functions that user just typed in the evaluator. For instance:
(cljs.js/eval-str
(cljs.env/default-compiler-env)
"(ns something)
(defn foo [] 9)"
nil
{:eval cljs.js/js-eval}
prn)
(deftest test-something
(is (= 9 (something/foo))))
So instead I tried populating the initial env with my test’s namespace, so that it has the dynamic code and the static tests together. This works if the test ns is not dependent on anything else. I can call the fns defined in the test ns from the dynamic code.
So I tried flipping the problem on itself. I am now using the compile-str
function to evaluate the dynamic code and put it in the compile-state
;; this works. I can see my-state getting updated
(cljs.js/compile-str my-state "(defn bar [] 18)" "foo" {:ns 'foo} prn)
;; this doesn't work and complains about foo not being defined.
(cljs.js/eval-str my-state "(bar)" "foo" {:ns 'foo} prn)
Is there a particular space/channel for re-frame? Or is this the best place to ask re-frame questions?
Hi, I'm looking for a simple clojurescript tests coverage tool. I found this https://github.com/cloverage/cloverage/ but it does not support clojuresciprt files. Are there any other tools?