This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-06-30
Channels
- # announcements (5)
- # beginners (90)
- # cider (15)
- # clara (1)
- # clj-kondo (2)
- # cljs-dev (17)
- # clojars (8)
- # clojure (132)
- # clojure-europe (14)
- # clojure-nl (5)
- # clojure-uk (57)
- # clojurescript (39)
- # code-reviews (44)
- # conjure (6)
- # core-async (6)
- # cursive (20)
- # data-science (1)
- # datomic (13)
- # fulcro (11)
- # graalvm (6)
- # graphql (6)
- # helix (10)
- # joker (2)
- # kaocha (37)
- # leiningen (24)
- # malli (15)
- # off-topic (13)
- # pathom (18)
- # pedestal (14)
- # re-frame (67)
- # reitit (5)
- # ring (13)
- # ring-swagger (4)
- # sci (41)
- # shadow-cljs (33)
- # slack-help (5)
- # spacemacs (1)
- # sql (34)
- # tools-deps (64)
- # vim (171)
- # xtdb (3)
Hi! I'm using shadow-cljs hooks (`:flush`) to trigger a little Linux command to show a notification in case a warning happens. I'd like to do the same thing each time an error appears, but none of the hooks seem to help
at thheller: I just startet using tap on the ring-request. Thank you!!!!! Very nice!!
Does anyone know what the right way to require
something like CodeMirror is? When I'm using random JS packages, I'm often a bit confused by the require/import statement.
If I do something like (:require ["CodeMirror" :as cm])
then cm
itself seems to be a function?
usually :as
just sets up an alias but in case of JS requires it may also be used as an object
Ok, thank you ! Not being much of a JS guy, I've never quite understood exactly how those JS namespaces/etc get mapped into cljs.
exactly as in CLJ basically the only difference is that CLJ doesn't allow :as foo
using foo
directly where each def
would be a property of that foo
But like periodically I see things that don't exist in CLJ, like :default
(I think?) ...
because CLJ or Java have no such concept. thats strictly about being able to use JS features as intended
I see an example where someone is using cljsjs
, and they require the clojure mode for CodeMirror like:
cljsjs.codemirror.mode.clojure
I don't quite understand how to do that, or translate it, to shadow-cljs using the npm directly.
Maybe if I understood a little more about the layout of an npm compared to the github repo for CodeMirror.
Hi, I was trying to println debug my routes and the output seems to be swallowed by shadow - is there a way around this ?
(def dev-handler (-> #'routes wrap-reload push-state/handle))
- this is the dev-handler generated from the re-frame template - I got a prn to work upon the load of the handler namespace
I recommend running any kind of server-related code separately. leave shadow-cljs out of it. you won't have shadow-cljs in production either so don't tie it to your development server either.