This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-01-29
Channels
- # announcements (8)
- # aws (34)
- # beginners (92)
- # calva (19)
- # capetown (1)
- # cider (10)
- # cljs-dev (7)
- # cljsrn (11)
- # clojars (7)
- # clojure (130)
- # clojure-europe (4)
- # clojure-italy (4)
- # clojure-losangeles (1)
- # clojure-nl (11)
- # clojure-russia (1)
- # clojure-spec (4)
- # clojure-uk (64)
- # clojurescript (51)
- # cursive (9)
- # data-science (6)
- # datomic (29)
- # emacs (3)
- # figwheel-main (14)
- # fulcro (4)
- # graphql (3)
- # jackdaw (2)
- # jobs (4)
- # kaocha (17)
- # leiningen (3)
- # luminus (1)
- # off-topic (46)
- # pedestal (6)
- # portkey (2)
- # re-frame (6)
- # reagent (1)
- # reitit (9)
- # shadow-cljs (9)
- # sql (10)
- # yada (6)
Hello guys
suppose i would like to make select input which have available countries and the user will choose from, is it better to make this list available via restful API call from the server, or should be read from static file via the client directly, or embed it as big hash in the client code and will be available from there, what is the best approach for this ?
it's just list of all countries to make the user choose from
good, thanks
what do people do to run cljs tests on a CI server when the project needs a dom?
headless chrome
or more specifically https://github.com/GoogleChrome/puppeteer
karma is pretty popular as well https://shadow-cljs.github.io/docs/UsersGuide.html#target-karma
Just for curiosity, what's your collection of "make-chrome-run-inside-docker" flags? We have a bunch, but I'm not sure if they're still needed with the latest chrome versions
I’ve been using this one: https://hub.docker.com/r/robcherry/docker-chromedriver/
I have similar setup here https://github.com/lipas-liikuntapaikat/lipas/blob/master/docker-compose.yml#L173-L187
@domparry do you have the deps defined as part of a profile? eg. lein with-profiles +cljs deps
correct me if i'm wrong, by setting :optimizations :none
, the compiler should not rename any functions in the javascript?
How are you loading Plotly into your application? The compiler will not rename local variables with optimizations set to :none
. Also you could probably set your optimization level to :whitespace
and still not have to worry about vars getting munged in your deployed build.
i'm trying to use Plotly for charts, but it doesn't work in the deployed environment, getting errors like Plotly.xr is not a function
which makes me believe the problem is that the compiler has been renaming stuff I don't want it to rename.
perhaps there's a better way of dealing with these kinds of issues so I don't have to turn optimizations off?
is it possible to get environment variables loaded into a project.clj, then have access to them in cljs?
I’d take a look at this https://www.martinklepsch.org/posts/parameterizing-clojurescript-builds.html. I’m sure leiningen supports this with a plugin. I use clojure.deps
and figwheel-main
and generate a [build-id].cljs.edn
config file that loads my environment variables prior to building the app.
I have some environment variables that are accessible via Node’s process.env
, I have access to them on the server side of my application but not on the client
@restenb Have you been using cljsjs? https://github.com/cljsjs/packages/tree/master/plotly
hey, :install-deps
does not seem to be true by default, just searched clojurescript repo and didn’t find any explicit default for it, can anyone confirm?
also docs don’t mention a default value: https://clojurescript.org/reference/compiler-options#install-deps
thanks, then cuerdas has wrong assumption that it is, I guess: https://github.com/funcool/cuerdas/commit/a8443724e22435e052af4149b27dd2169f3216ac
I’m not alone, even enabling :install-deps
fails on me with compiler stack trace: https://github.com/funcool/cuerdas/issues/71#issuecomment-458679019
ah, that's pretty wild. Might be something edge-casey about your env. I've been planning to integrate plotly into our stack soon.
with error messages like Uncaught TypeError: Plotly.Zj is not a function at Object.<anonymous> (app.js:984) at Object.componentDidMount
all I could think was that compiler optimizations messed it up somehow
see if the function you're trying to call is in here: https://raw.githubusercontent.com/cljsjs/packages/master/plotly/resources/cljsjs/plotly/common/plotly.ext.js