This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-15
Channels
- # ai (35)
- # announcements (3)
- # babashka (16)
- # babashka-sci-dev (2)
- # beginners (37)
- # biff (16)
- # calva (5)
- # cider (2)
- # clj-commons (81)
- # clj-kondo (29)
- # cljfx (2)
- # cljs-dev (4)
- # clojars (4)
- # clojure (92)
- # clojure-europe (72)
- # clojure-losangeles (8)
- # clojure-nl (1)
- # clojure-norway (10)
- # clojure-uk (1)
- # clojurescript (20)
- # clojutre (2)
- # conjure (2)
- # data-science (18)
- # datomic (1)
- # emacs (10)
- # fulcro (49)
- # joyride (1)
- # kaocha (23)
- # leiningen (8)
- # lsp (14)
- # meander (5)
- # off-topic (93)
- # polylith (4)
- # re-frame (20)
- # reagent (9)
- # reitit (2)
- # remote-jobs (8)
- # sci (1)
- # shadow-cljs (21)
- # testing (3)
- # vim (27)
- # xtdb (35)
Working on a small greenfield project for work. Mostly a static pricing application. I would like to hash various assets like images and css files but I'm not sure on the best way to accomplish that with shadow. Was thinking a build hook might be interesting, or compiling to esm and using esbuild to bundle but not sure shadow will like importing image files, perhaps best to have an nbb script run before each build to generate a bundled edn file that points the common name to an asset version path? Any better ideas or examples out there?
https://github.com/ljpengelen/shadow-cljs-hash-assets-hook found that which might work but not sure that solves the problem for assets that need to be dynamically rendered from React
IMHO shadow-cljs doesn't need to know about any of this and shouldn't be involved at all
I see. That's the strategy I was leaning towards, generating an edn file included with the build to point to assets but after exploring frameworks like remix, directly importing assets is nice because it only needs to generate hashes\optimize resources referenced vs generating a manifest by hashing all asset files. Alternatively, might be able to reach a reasonable middleground by scanning the cljs code for refs to asset paths and only generating assets for those, somewhat inspired by how tailwind figures out what classnames to define in the compiled css file.
after a few beers i accidentally accessed the nrepl port (localhost:8777) in a browser, which resulted in an arithmetic exception (long overflow). just thought i'd let you know
So today I learned that you get the same exception if you're in Cursive and mistakenly connect to shadow's nrepl but the cursive repl config says Connection Type = Socket REPL
Just leaving this here in case someone comes across long overflow
trying to start a cljs repl via Cursive.
Thanks, @U028ZNM1S13 I managed to find the same issue. Have commented solution on this long-standing issue on nREPL repo: https://github.com/nrepl/nrepl/issues/285
hello, what config can I set so shadow-cljs stop preventing reload on deprecate warnings?
a bit more info: I'm adding cljs tests to a library, the tests do call deprecated functions, but that's an OK situation here, we want the fn to be deprecated, and still want to test it, is there a way to ignore all deprecation calls? or tune the tests namespaces to ignore them?
:warnings-as-errors
search for it in the user guide there is a link to the list of possible values
but I guess that's to do the opposite of what I want no? this seem to be a way to raise the warning and behave as an error, I want to ignore instead
actually my bad, i have :ignore-warnings true
instead in the :devtools
section so that's probably this one
just an errata for anyone looking at that in the future, to disable the deprecate warning, this is the config:
:compiler-options {:warnings {:fn-deprecated false}}