cljs-dev

ClojureScript compiler & std lib dev, https://clojurescript.org/community/dev
wcohen 2020-07-10T17:13:56.400900Z

Is package.json + build.edn (rather than :npm-deps) now the best place for a cljs library (per https://clojurescript.org/guides/webpack) to note its js dependencies and a path to a working bundling method, which then assumes that downstream users will just need to be aware that they need to add those for themselves on their own?

lilactown 2020-07-10T17:15:42.401300Z

CLJS libs that depend on npm libs should note them in deps.cljs

wcohen 2020-07-10T17:28:33.404700Z

so is it fair to say that the bundle target with aggressive js hinting may solve npm usage and advanced compilation for the final stages of projects, but cljsjs is still a needed step for libraries? i thought i’d finally escaped generating externs!

lilactown 2020-07-10T17:34:24.404900Z

no

lilactown 2020-07-10T17:36:25.406700Z

the webpack guide doesn’t really go into it, but if you assume that people are using the :bundle target, then the idea is you place your libs npm deps in deps.cljs to tell downstream apps/libs to install them. then, use them throughout your lib code the same way it says in the webpack guide

wcohen 2020-07-10T17:36:55.407100Z

oh. lovely. that’s perfect. thank you so much

lilactown 2020-07-10T17:37:11.407400Z

sure thing!

lilactown 2020-07-10T17:37:26.407800Z

this also operates well with shadow-cljs projects too