This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-10-28
Channels
- # announcements (8)
- # architecture (10)
- # babashka (24)
- # beginners (93)
- # calva (2)
- # chlorine-clover (6)
- # cider (2)
- # cljfx (3)
- # cljsrn (5)
- # clojure (59)
- # clojure-australia (2)
- # clojure-canada (9)
- # clojure-europe (46)
- # clojure-nl (3)
- # clojure-spain (1)
- # clojure-spec (2)
- # clojure-uk (6)
- # clojurescript (98)
- # cryogen (20)
- # datomic (22)
- # depstar (14)
- # emacs (4)
- # etaoin (2)
- # figwheel-main (1)
- # fulcro (5)
- # graalvm (1)
- # java (69)
- # malli (33)
- # off-topic (5)
- # pathom (1)
- # re-frame (14)
- # reagent (10)
- # shadow-cljs (24)
- # sql (22)
- # vim (2)
hello everyone! does anyone have experience setting up a cljs project with shadow-cljs + sass + bulma? i am a bit lost on how to get bulma to work. i have installed the package and imported in my scss
file but am not seeing the classes work in the UI
i have this in my <head>
<link href="/css/style.scss" rel="stylesheet">
and this at the top of my scss
file (pls disregard the /css
folder i know it is incorrect)
@import "./node_modules/bulma/bulma.sass"
you need to run node-sass
or so to process the scss file. html can only load the resulting actual css
this is what i ended up doing as well! thanks for the heads up @U05224H0W!
Having major issues with figwheel (I think?). Setup has been acting strangely the entire project but now it's just completely borked. Right now code that runs fine on heroku and certainly compiles with lein cljsbuild once app
at first wasn't working properly on my box, after a lein clean
won't even run under figwheel citing string.cljs
not existing. I'm basically at the point where I need to obsessively restart and run lein clean
or even nuke my .m2 every so often. What might be causing something like that?
Sounds like either something been broken from day 1 or your environment is borked. Try creating a new project from scratch to see if you can reproduce the issue in a smaller scope. If everything is still funky, I'd start looking around in my own OS. If everything works, try adding more stuff from your main project into the new one until it starts breaking
Yeah evidently. But can't wrap my head around how tho. Redo of m2 did the trick afa compiling (as usual) but just got me back to the earlier point of re-frame subs suddenly not doing my bidding. I've completely cleaned out my profiles.clj so there shouldn't, really couldn't, be anything left hmm.
I suppose answer is dockerize the fucker and if not properly pin down what exactly changes and where, at least have an easier time getting clean slate. But then slate is supposed to be your deps and your code so, uhh.
Have you tried clearing your browser's cache or opening the webapp in incognito mode? Sometimes the caching messes with me badly.
yup i'm in incognito. The caching is horrible, agreed. But sadly not my current issue 😕
seems incognito not enough, went for disabling cache and at least code is current now haha. just not working anyways
yup turns out suspicions correct, something about figwheel... with cljsbuild straight and a bunch of fiddling I finally managed to get what what's supposed to work working and what isn't, not. Hurray! Probably time to look towards moving away from sidecar since it's not seeing updates.
Hi folks, It seems for some reason reagent can’t find React anymore, and I get these kind of messages:
Uncaught TypeError: $reagent$impl$component$$.$node$module$react$ is undefined
With figwheel locally it works, also the compiled minified bundle (with :psuedo-names true) shows that React / ReactDOM are in there.
Any pointers in how to debug this?
I’ve tried many things, can’t for the life of me figure out why it happens. No webpack or any form of bundling, and some other projects with similar deps I run run just fine.
My build config:
:cljsbuild
{:builds {:uberjar {:source-paths ["src/cljs" "src/cljc"]
:compiler {:main aviationglass.core
:optimizations :advanced
:asset-path "/js/compiled/out"
:output-dir "resources/public/js/compiled"
:source-map "resources/public/js/compiled/main.js.map"
:output-to "resources/public/js/compiled/app-min.js"
:pseudo-names true
:pretty-print true
:source-map-path "/assets/js/compiled"
:externs ["resources/public/js/uppy.extern.js"]
:infer-externs true
:install-deps true
:closure-defines {goog.DEBUG false}
In the app-min.js there’s React in there, in the browser console React.version
shows 16.13.0
tried different :optimizations as well, and this projects ‘used to work’ with older reagent version, but i have another similar projet with 1.0.0-alpha2 that runs just fine
anyone knows how to make github actions (node) with cljs?
here is one such example: https://github.com/mvc-works/lilac/pull/8/files
but, I'd probably go for something like babashka if you're just doing smaller scripts. Way faster startup
https://github.com/actions/javascript-action => something like this
but yeah, I know about babashka 😃
Thanks for your response, already shedding some light.
I was going trying the :target :bundle
route, but that yielded some other problems, so was going to go back. But now it’s just vanilla clojurescript from a leiningen project with lein-cljsbuild with above parameters. There is a node_modules directory, but afaik all explicit mentions of it are removed.
Can I tell if/how the cljs compiler is looking in the node_modules dir when compiling? Could it be through transative dependencies?
(defproject aviationglass "0.1.0-SNAPSHOT"
:dependencies [[org.clojure/clojure "1.10.0"]
[org.clojure/core.async "0.4.490"]
[org.clojure/clojurescript "1.10.597"]
[re-dnd "0.1.19"]
[re-val "0.1.3"]
[sweet-crud "0.1.2"]
[reagent "1.0.0-alpha2"]
[reagent-utils "0.3.1"] ; cookie/session mgmt
[re-datagrid "0.1.10"]
[cljs-ajax "0.8.0"] ;
[re-frame "1.1.1"] ;client-side reagent framework
[re-frame-utils "0.1.0"]
[clj-commons/secretary "1.2.4"] ;client-side routing
[compojure "1.6.1"]
[metosin/compojure-api "2.0.0-alpha20"]
[ring "1.7.1"] ;ring + midddleware
[ring/ring-defaults "0.3.2" ]
[ring/ring-json "0.4.0"]
[http-kit "2.3.0"] ; high performance HTTP server
[day8.re-frame/http-fx "0.1.6"]
[day8.re-frame/async-flow-fx "0.0.11"]
... snip ...
Or does the cljs compiler nowadays just ‘notice’ an node_modules directory and do something with it implicitely?
but how come the React is in the final artefact? Maybe reagent requires it differently now because it somehow thinks it should be in node_modules?
right switching back and forth between bundle and the old way will likely create a confusing state
i backtraced to this state because of somehow a hanging build (and a nearing deadline making me do things the old way) But that’s a story for another day; at least i can show my customer something now 🙂
sure, not asking you to either 😉 you’ve already been of enough help for today, will try that again later! 🙂
hi all, is there an idiomatic cljs way of handling long-press events instead of translating the js equivalent please ? (cljs noob here)
(let [long-press-chan (timeout 1000) [c _] (alts! [long-press-chan mouse-release-chan])] ...)
something like that, you can check whether c
is a long-press or a mouse-release and then do whatever
Has anyone any experience of this course ? https://www.learnreframe.com/#course ?
I'm almost finishing it. It's a good course. Gives a good overview of reframe, but it's a more hands-on in my opinion which is good depending on your purpose. It helped me a lot as I didn't have any experience with Reframe before. If you really want to understand the different parts of reframe I can recommend https://purelyfunctional.tv/courses/understanding-re-frame/