This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-11-05
Channels
- # 100-days-of-code (1)
- # announcements (7)
- # beginners (84)
- # boot (1)
- # cider (22)
- # cljdoc (14)
- # cljs-dev (45)
- # cljsrn (6)
- # clojure (65)
- # clojure-conj (7)
- # clojure-finland (1)
- # clojure-italy (7)
- # clojure-nl (2)
- # clojure-serbia (1)
- # clojure-uk (111)
- # clojurescript (58)
- # cursive (8)
- # datomic (68)
- # duct (1)
- # emacs (33)
- # figwheel (3)
- # figwheel-main (9)
- # fulcro (33)
- # graphql (1)
- # juxt (30)
- # kaocha (4)
- # off-topic (22)
- # pathom (47)
- # pedestal (4)
- # planck (6)
- # re-frame (1)
- # reagent (1)
- # reitit (13)
- # shadow-cljs (49)
- # spacemacs (7)
- # sql (6)
- # tools-deps (60)
hi, I'm having troubles understanding the meaning of "cljsjs packages are not supported" (https://shadow-cljs.github.io/docs/UsersGuide.html#cljsjs) — for instance, to use re-frame-10x, as it is mentioned here (https://github.com/Day8/re-frame-10x/blob/master/docs/Advanced-Setup.md#using-shadow-cljs) I just need to npm install
some packages, but I will have some global variables exported (ie js/FlipMove
), which means that somehow these lines are still taken into account? https://github.com/cljsjs/packages/blob/ade50f320730c9f144382a519414e09c8ba73fe5/react-flip-move/build.boot#L33-L36
@U5UCAE37Z its not, the reason it works is because of shadow-cljsjs
this contains some pre-packaged ways to load things to look like they come from cljsjs
, but they dont
if the library you want to use is not there, you will need to export the symbols yourself
oh I see it is already in the package shadow-cljsjs
? because I thought I had to add it manually, but ok that would make sense... Thanks!! I was confused 🙂
no worries, the shadow-cljsjs comes built-in with shadow, so new stuff might need new versions, but its usually updated
shadow never ceases to amaze me!
upgraded to Clojurescript 1.10.439 and now getting compile errors: https://gist.github.com/kanwei/6d7e68bb26074b1c6a7e5036c3bc157f
there also seems to be a caching issue: i use inferno-compat instead of react, and upgraded all the dependencies in package.json, and ran npm-install. running shadow-cljs only upgraded inferno-compat, and doing console.log(inferno) still showed old version. i removed the entire .shadow-cljs folder and it built with the updated inferno.
I already mentioned that issue and there is a solution on master, I believe.
out of curiosity, what does this warning mean
63 | (when (exists? event.target.files)
------------------------------------^-------------------------------------------
js/event is shadowed by a local
ah, I took it for typef x.y.z !=== 'undefined' but it's trivial to do this logic differently... (or not do it at all since it should always exist in input type="file") thanks!
@kanwei 1.10.439 is not currently supported. I'm hesistant to push the update to make it compatible because it has a pretty annoying externs inference regressen https://github.com/thheller/shadow-cljs/issues/401
@kanwei the cache issue I don't know. did you have the watch
running while npm install
was doing its thing?
just to recap you had an old version of inferno-compat and just installed a new version over it but shadow-cljs didn't pick it up?
i had old versions of 5 libraries:
"inferno": "^6.1.4",
"inferno-clone-vnode": "^6.1.4",
"inferno-compat": "^6.1.4",
"inferno-create-class": "^6.1.4",
"inferno-create-element": "^6.1.4",
when i upgraded today, all of them to 6.1.4, inferno-compat updated but inferno stayed at 5.6.1
:js-options {:resolve {"moment" false
"react" {:target :npm :require "inferno-compat"}
"react-dom" {:target :npm :require "inferno-compat"}
"create-react-class" {:target :npm :require "inferno-reagent-compat"}
"jquery" {:target :global
:global "jQuery"}}}
👋 Hi fellows, I'm trying to do some challenging js<->cljs interop with a js library that internally uses promises to call functions that the user supplies (which seem to need to be pre-compiled into javascript for it to work). I'm rummaging around the shadow docs and trying to work out how to configure some test code, compile it to js then re-include it as a require
I can't seem to resolve / require
the local file that I've compiled...
I get this:
The required JS dependency "../../dist/test.js" is not available, it was required by "workers/core.cljs".
This is the first time I'm actually trying to compile with shadow-cljs... I've been working solely in dev mode (@ 5-months) so far