This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-05-06
Channels
- # announcements (5)
- # aws (28)
- # babashka (4)
- # beginners (163)
- # bristol-clojurians (2)
- # calva (4)
- # cider (18)
- # clj-kondo (30)
- # cljs-dev (28)
- # cljsrn (50)
- # clojure (96)
- # clojure-europe (25)
- # clojure-italy (6)
- # clojure-losangeles (1)
- # clojure-nl (4)
- # clojure-sweden (7)
- # clojure-uk (32)
- # clojurescript (39)
- # conjure (74)
- # cursive (12)
- # events (1)
- # fulcro (32)
- # helix (71)
- # jackdaw (2)
- # leiningen (10)
- # off-topic (14)
- # pathom (59)
- # rdf (7)
- # re-frame (6)
- # reitit (28)
- # ring (7)
- # shadow-cljs (207)
- # slack-help (2)
- # spacemacs (3)
- # specter (7)
- # sql (12)
- # tools-deps (14)
- # xtdb (32)
Hello! I need check some regex on frontend side, f.e. emails, phones, etc. I found out a lot of examples, but they are different for Java and JS. Which ones should I use in Clojurescript? Maybe there are some shared examples?
I tried using wasm from Clojurescript, using the new way from https://clojurescript.org/guides/webpack but it doesn't work as easily as react does. Does someone has a clue, current state at https://github.com/gklijs/cljs-gl-3d.
@gklijs you didn't include the package.json
so it's a bit hard to tell what will happen
@noisesmith, @lilactown assessment is correct - you cannot share data between two independent JS contexts - this always true - it doesn't matter what JS environment you're talking aobut
@gklijs I think the problem is that the file name doesn't correspond to the require - I have a feeling this is a case not covered in the Node module resolver - nothing really to do with WASM
I'm trying to set up smoke tests with etaoin on a clj/cljs project, that should be easily runnable both from the repl and as tests in CI and locally
does anyone have some example set up I can look at (steal)? we are using to set up the whole system, which poses the first questions since I'd like to have both jetty servers running at the same time in the repl. So in general I was thinking that I could do something like
(defn fixture-driver
"Executes a test running a driver. Bounds a driver
with the global *driver* variable."
[f]
(e/with-firefox {} driver
(binding [*driver* driver]
(f))))
(defn config
[]
(-> dev-config
(merge (figwheel-config "automation"))
;; the port change is just for convenience locally
;; to avoid conflicting with the running jetty
(assoc-in [:server/jetty :port] 3334)))
(defn start-everything
[f]
(ig.repl/set-prep! config)
(ig.repl/go)
(f)
(ig.repl/halt))
(use-fixtures :once start-everything)
(use-fixtures :each fixture-driver)
but I have a few problems already, if anyone has done something similar I'd love to have a look how you did itthe first weird thing is with figwheel-main
(figwheel.main/status)
------- Figwheel Main Status -------
Currently available: automation, dev
No builds are currently being built.
nil
but if I try to restart the build
1. Caused by clojure.lang.ExceptionInfo
A build with id "automation" is already running.
{}
so somehow it's running but I can't access it or it's just confused I'm not sure@andrea.crotti might want to also ask in #figwheel-main
yes thanks @dnolen, I asked here because I was just looking for the whole set up if anyone had suggestions, I can probably figure out the problems with the various pieces, just to check that my approach made sense
@andrea.crotti this looks pretty figwheel-main specific to me
one thought is that this seems like it could become overly complicated - I don't know why you would want figwheel running in your testing setup
uhm well the pieces involved imho are kaocha+etaoin+figwheel-main+jetty+sassc (mostly managed via integrant) for example
ah yes I probably can avoid running figwheel you're right
cool thanks
i'd like to expose a javascript object that a js library requires to have certain functions on - what is the idiomatic way to do that in cljs?
hey, I'm following the new webpack guide here: https://clojurescript.org/guides/webpack and was wondering once I have a repl up with the -r flag, what port/repl type do I need to connect to if I want to access it in Cursive?
so you can literally use the clojure.main
option in cursive and just pass the additional parameters from the guide
Is my REPL configuration correct?
ohh I've got to run with deps but can't select that for some reason, will try re-creating
cool got it working, is it possible with an emacs configuration?
its straightforward in inf-clojure and should be straight forward with piggieback and nrepl but i haven't tried that route yet
@sfyire every REPL tool I'm aware of should work with standard ClojureScript REPL at this point
I got https://github.com/Olical/cljs-test-runner working again with :bundle
target. The problem is actually in https://github.com/bensu/doo, where I introduced an :output-to
option in doo-opts
. So you specify the post-webpack output file (`main.js`) there. This dep in your project adds support for the new doo-opt :output-to
doo {:git/url ""
:sha "6b23f6dda71576898e98a8c10188fa777b1af0b0"}
I might have got it all wrong in other ways, but at least that fixed my problem. Use at your own risk.