This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (3)
- # beginners (128)
- # boot (2)
- # braveandtrue (97)
- # calva (13)
- # cider (4)
- # cljdoc (12)
- # cljs-dev (16)
- # clojure (78)
- # clojure-germany (8)
- # clojure-italy (5)
- # clojure-nl (1)
- # clojure-spec (59)
- # clojure-uk (29)
- # clojurescript (46)
- # core-async (9)
- # cursive (63)
- # data-science (3)
- # datomic (22)
- # devcards (1)
- # duct (7)
- # emacs (4)
- # flambo (2)
- # fulcro (37)
- # instaparse (6)
- # jobs-discuss (38)
- # juxt (1)
- # off-topic (35)
- # om-next (1)
- # parinfer (7)
- # re-frame (14)
- # reagent (6)
- # reitit (21)
- # rum (1)
- # shadow-cljs (74)
- # spacemacs (8)
- # specter (1)
- # sql (3)
- # testing (2)
- # unrepl (2)
- # yada (6)
are lifecycle hooks working for
node targets: I am trying to use
:after-load but it does not seem to get triggered
I will present me team shadow-cljs as alternative to leiningen. Maybe we could use it instead. Can you recommend articles about lein <-> shadow-cljs code compatibility, something what prove shadow-cljs is mature solution and no scary to use it etc.?
I assume you mean switch from cljsbuild/figwheel though and no I haven't written anything on that subject yet
I started several times but its tough for me to write it since I haven't used cljsbuild/figwheel for 4+ years
I think the main difference is how
:require macros looks. Also in shadow we can write
event.target.name while in lein we can not (as i know)
shadow-cljs just uses the normal CLJS compiler. the only modification it does is basically to the parsing of the
ns form. thats it.
none will work but you can "emulate" them. some are already emulated. https://github.com/thheller/shadow-cljsjs/tree/master/src/main
BTW Why somebody could prefer https://shadow-cljs.github.io/docs/UsersGuide.html#Leiningen instead of use shadow-cljs directly?
the only focus of shadow-cljs is CLJS development. if you do any kind of CLJ development I recommend using
lein for that part.
some people prefer running only one tool and embedded shadow-cljs in their CLJ server process instead
so for projects which contains clj and cljs files in the same project / repository ?
if you do any kind of CLJ development yes. the presence of
.clj files could just be macros or utility functions, those are fine for shadow-cljs
some also use
deps.edn for pure CLJS development though due to the extra features
deps.edn offer (eg. git-deps)
standard clojurescript has the limitations, not lein. and no it is still a work-in-progress with many rough edges.
shadow-cljs basically uses the standard clojurescript compiler but replaces the JS support with its own implementation. thats it.
Hmm so while you could rewrite this limitations in shadow-cljs, why standard cljs can’t?
standard cljs is targetting a harder integration, they want to make so every node module is correctly understood by Google Closure so they can be optimized on release builds. As far as I understand, Shadow relaxes on this goal and just copy over the used files (grossly speaking), this doesn't have all the good optimizations, but works
the JS integration in shadow-cljs is basically modeled after webpack instead and following their conventions.
@dnolen say I am producing a ClojureScript library which has
npm dependencies, does the Webpack method would work there? seems like I would still need to declare transitive
as in - they will never interoperate - but this not really important for the common use case of - I just need X from node_modules for this thing I’m trying to ship
right, so the webpack solution is only for compiling down in order to produce either a
node script or a
browser JS - make sense, thank you!
So mainly based on https://github.com/thheller/shadow-cljs/issues/179#issue-289518679
I'm trying to come up with devcards template for shadow-cljs https://gitlab.com/urbanslug/sniff/blob/master/shadow-cljs.edn
However, when I run
yarn devcards I get the error that the build for app isn't running and well devcards doesn't work.
Anyone have an idea about this?