This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-01-28
Channels
- # announcements (5)
- # aws (16)
- # beginners (62)
- # calva (2)
- # cljdoc (17)
- # cljs-dev (2)
- # clojure (89)
- # clojure-brasil (1)
- # clojure-europe (3)
- # clojure-italy (12)
- # clojure-nl (1)
- # clojure-russia (2)
- # clojure-spec (10)
- # clojure-uk (26)
- # clojurescript (45)
- # cursive (4)
- # data-science (6)
- # datavis (1)
- # datomic (15)
- # duct (5)
- # fulcro (55)
- # juxt (1)
- # kaocha (2)
- # leiningen (1)
- # off-topic (101)
- # pathom (12)
- # portkey (4)
- # quil (5)
- # re-frame (9)
- # reagent (2)
- # reitit (28)
- # shadow-cljs (114)
- # spacemacs (9)
- # speculative (2)
- # sql (3)
- # test-check (18)
lol, so uh,m real dumb question. When I've compiled using the clj cli... how do i host that file?
release build. theres a bunch of cruft in the file, my guess is a dependency on something that isnt being pulled in by deps
lol, speaking of foreign libs, I have no idea how to get them to work, even in the repl. npm dependencies - y u so hard?
yeah, most of my projects use a lot of npm libs so I use shadow-cljs for compilation
what do people do to run cljs tests on a CI server when the project needs a dom?
right, right. @borkdude I'm asking if shadow-cljs is a replacement for figwheel or something that works along side it
it is a complete replacement and does not work with figwheel. it does however provide it own life-reload functionality if that is what you are looking for.
I can use :npm-deps
to install it but requiring it seems to fail when it tries to resolve importing dependencies within the same package.
@batoms you might also want to check out https://github.com/andrewmcveigh/cljs-time
Thanks @roman01la, that’s probably a better idea.
I'm referencing a global JS variable I require in via foreign libs (js/Plotly.react). In advanced compilation I'd expect this to be renamed by the closure compiler and therefore I'd need to provide externs. This doesn't appear to be the case and is there in my compiled js as above. Am I misunderstanding something :) I have infer externs on, I thought that just outputted them to inferred-externs.js, are they automatically used by the compiler at the same time?
The key here is that you add a lib as foreign libs
foreign libs never go through Closure, they are just prepended as is
to the output of Closure
But doesn't my clojure code which references that code go through the compiler?
And rename my ref thinking it can minify it.
aaah I see, yes if you have externs inference on it should to it automagically
you can do (set! *warn-on-infer* true)
in a namespace with interop code and you’ll see more info during compilation
I see, I'm only referencing a simple top level variable so it makes sense it could infer it, I just didn't think it also used that inference automatically. I guess I'll have to re-read the docs
afaik inference was much improved in the last release
>A helpful facility for generating :externs whenever a . form is used on a type-hinted symbol ^js/Foo.Bar x. Enable warn-on-infer to be warned of failed inferences. Successful inferences are written to inferred_externs.js in :output-dir.
I guess the first part is what tells you it will be used
so if JS object is passed somewhere such as compiler can’t infer what is that you can annotate it with ^js
and that should od the job
It will generate the value of the :externs option to the compiler
Which fits with the behaviour I'm getting so all good :) inferring meaning can be hard sometimes, thanks :)
Has anyone used http://Cypress.io in their Clojurescript project? I am looking into using it but I don't really have a good idea on how to get started with it. Should I just stick with Selenium? I basically just want to automate a series of steps I do every time make changes e.g Go to localhost:3449, click on a checkbox, select from a dropdown, type in a word, etc.
Yup, driven from webpack (using shadow-cljs). It's considerably nicer than selenium, but it's not without its own quirks. And so is etaoin, used on a separate project. In the end you're still at the mercy of the browser+js behavior.
@mario.cordova.862 I know figwheel has automatic CLJS tests on change. I use etaoin for automated browser testing.
Thanks Sean