This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-08-03
Channels
- # announcements (63)
- # asami (29)
- # beginners (23)
- # calva (23)
- # cider (18)
- # clj-kondo (12)
- # clojure (156)
- # clojure-europe (30)
- # clojure-italy (6)
- # clojure-nl (5)
- # clojure-uk (6)
- # clojurescript (14)
- # conjure (26)
- # cursive (8)
- # datalog (143)
- # datascript (1)
- # datomic (6)
- # duct (2)
- # emacs (50)
- # events (4)
- # figwheel-main (6)
- # fulcro (7)
- # graphql (12)
- # jobs (6)
- # malli (1)
- # mid-cities-meetup (2)
- # off-topic (4)
- # pathom (6)
- # portal (7)
- # re-frame (10)
- # reagent (8)
- # reitit (10)
- # releases (1)
- # reveal (18)
- # shadow-cljs (39)
- # sql (4)
- # tools-deps (36)
- # vim (25)
- # xtdb (6)
@cancandan I recommend looking at #figwheel-main for hot reloading goodness
Anyone know a good QR reader and QR creator library for cljs?
I am always star struck when you answer! :D We are using leiningen with lein figwheel. I guess for the best use of js libraries and npm we need to go over to shadow-cljs, right? I wish there was a guide on how to setup a complex shadowcljs (with leinigen perhaps) project.clj file. :x
@shakof91
The simplest way to use JS libraries for leiningen is https://github.com/cljsjs/packages
I see they have two packages when searching for qr
.
If you want to use any npm package with leiningen, you can use the recently added bundle target https://clojurescript.org/guides/webpack
Instead of creating the edn files, you should add the build config to project.clj (`:cljsbuild :builds :your-profile :compiler` I think).
Oh wow! That is very interesting! We are using lein cljsbuild currently. It would be great to be able to integrate javascript libraries like that. :D Do you have to use things like binaryage/oops for the javascript interop so that advanced compilation works, or does webpack take care of all of the issues with foreign libs etc? :o
I haven't tried it myself, but the guide says this > Note the new :target :bundle option. This ensures that the generated code is compatible with popular JavaScript bundlers that can handle Node.js style require. It also sets a bunch of other sensible defaults like externs inference, so that advanced compilation will just work. so it definitely sounds like it!
That is pretty awesome. I love how clojurescript just keeps getting more and more awesome. :D Thank you sir @U050B88UR!
still kind of cljs newb here. how should i be calling getElementById? via interop or get-element?
makes sense to me. there's a fine line between idiomatic and idiot pedantic.