This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-04-06
Channels
- # announcements (33)
- # babashka (13)
- # babashka-sci-dev (23)
- # beginners (94)
- # calva (105)
- # cider (37)
- # circleci (1)
- # clj-kondo (45)
- # cljs-dev (59)
- # cljsrn (2)
- # clojure (145)
- # clojure-czech (1)
- # clojure-europe (19)
- # clojure-nl (18)
- # clojure-norway (13)
- # clojure-portugal (1)
- # clojure-uk (5)
- # clojurescript (19)
- # community-development (2)
- # conjure (3)
- # copenhagen-clojurians (1)
- # core-async (34)
- # data-science (6)
- # datomic (25)
- # emacs (43)
- # fulcro (19)
- # graalvm (7)
- # graalvm-mobile (12)
- # graphql (10)
- # honeysql (3)
- # hyperfiddle (3)
- # improve-getting-started (2)
- # interop (20)
- # kaocha (3)
- # lsp (16)
- # meander (7)
- # off-topic (22)
- # other-languages (14)
- # portal (15)
- # releases (1)
- # rewrite-clj (2)
- # ring (1)
- # shadow-cljs (119)
- # spacemacs (19)
- # sql (65)
- # testing (4)
- # tools-deps (11)
- # xtdb (29)
Hello everyone! (newbie here, be gentle 🥸) Anyone knows a way to pretty-print a map? https://clojuredocs.org/clojure.pprint/write function prints it beautifully on my console but I want it to be printed on my web page.
[:pre (with-out-str (pprint {:a 1}))]
with (:require [clojure.pprint :refer (pprint)])
Tyvm! 🙌
what’s the current META for clojurescript testing with shadow? the good old CI build targeting Karma?
I usually use something like:
(defn fetch [url options]
(let [https? (str/starts-with? url "https")
http (js/require (str "http" (when https? "s")))]
(js/Promise.
(fn [resolve reject]
(let [req (.request
http
url
(clj->js options)
(fn [res]
(let [body (atom "")]
(.on res "data" #(swap! body str %))
(.on res "error" reject)
(.on res "end" #(resolve @body)))))]
(.write req (:body options))
(.end req))))))
Well.. I get back a promise and I'm unsure what to do with it. 😅 so I guess I'm learning about that now.
You can (.then promise (fn [value] ...))
. Everything dealing with IO in node is going to involve callbacks or promises
Libraries, or maybe something built in both work, anything I google comes up with cljs-http, but it seemed a little convoluted for a simple github action that I'm making.
Does anyone know what’s best practice for doing css animations in clojurescript? I don’t want to have to hand roll the css keyframe and swap classes and I like to keep everything inline so animations are internal to a component. Any ideas?
I just use animate.css for all the simple transitions/animations, but I'm not sure if that is all you need. https://animate.style
Hadn’t seen this but yeah think I’m going to need something more powerful/I’m a control freak. Good to know there’s stuff out there for something like this though. My current approach is just to hand roll the css animations so if that’s what I stick with at least this would be a good reference