This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # beginners (4)
- # boot (186)
- # cider (68)
- # cljsjs (2)
- # cljsrn (6)
- # clojure (103)
- # clojure-dev (1)
- # clojure-russia (117)
- # clojurescript (40)
- # community-development (31)
- # cursive (2)
- # data-science (7)
- # datomic (6)
- # devcards (2)
- # editors-rus (2)
- # emacs (2)
- # jobs (2)
- # ldnclj (2)
- # lein-figwheel (41)
- # off-topic (5)
- # om (50)
- # overtone (2)
- # re-frame (36)
- # reagent (1)
- # spacemacs (3)
- # yada (2)
does anyone know of good open source examples of
:foreign-libs being used to consume commonjs modules?
if you don't control all the files IMO the better option is to just use webpack or browserify to compile the modules away.
Maria's code can't deal with NPM modules as they are for example and supports only relative requires (the only module root it considers is
is there a way to debug this:
#object[SyntheticKeyboardEvent [object Object]] //
#object[SyntheticEvent [object Object]] without needing to install clairvoyant or clj-devtools?
What’s the preferred way of doing cache busting these days? I have a project in boot with LESS and Cljs resources, with an nginx reverse proxy that sets the cache expire headers, but I need some sort of cache busting (e.g. fingerprinting assets, ETags or something like it) so when we push a new version on prod the client-side cache gets invalidated
there seems several ways of doing this, but I’m unsure what’s the best/simplest. We use Selmer templating to load up the main page
@joelkuiper: on s3 i like fingerprinting which gives most fine grained invalidation control but many people just use a uri param
@pandeiro: right the fingerprinting itself is easy but then you need code that knows what paths to use for which objects etc
(which is itself a composition of the sha1 computation, renaming, and html manip tasks)
@jaen thanks, so you’re saying I would need to build it into a static file and import that, and along the way probably make some externs?
The lib builds material-ui to a single file using scripts in
build-mui and then uses that as a foreign lib.
This for example might mean, you will not be able to use React from cljsjs, if the library needs to
require it explicitly (like
@blissdev: you can describe external deps with browserify, which might be worth investigating if you want to continue to use the cljsjs version of react
to automatically generate externs for you. afaik, it loads the JS file then traverses the object you give it to figure out typing and so forth.
@blissdev: I'd say that's a really good starting point, as it will get most of what you want, and then you can fill in the rest by hand
i actually asked on #C0E66E1H7 but it’s the weekend, so i understand no response yet