figwheel-main

octahedrion 2023-04-25T15:11:13.259369Z

when using JS libraries distributed via NPM is there any way to completely avoid having to interact with NPM ? Why can't such libraries be listed as dependencies in deps.edn the way we do with :mvn/version ?

octahedrion 2023-04-26T14:47:18.846669Z

@jr0cket thanks, I used to use cljsjs when it was alive but even then it was always out of date. Since it was deprecated it suggests using shadow-cljs but as far as I'm aware that still requires direct interaction with npm, also I'd prefer to stay with figwheel

practicalli-johnny 2023-04-26T16:00:38.531429Z

Yes, shadow-cljs does avoid the limitations that Cljsjs had to work within. The excellent https://shadow-cljs.github.io/docs/UsersGuide.html goes into great (and essential) detail and does simply much of the process of using JavaScript packages as possible. However, as Sean commented, using JavaScript is inherently more complex than using ClojureScript alone. A judgement is required as to if using JavaScript on a ClojureScript project provides enough value to make up for the extra complexity. Or if everything should be written in ClojureScript Personal I stick to ClojureScript as much as possible, with a CSS framework to make the UI look professional (e.g. something simple and effective like http://bulma.io)

octahedrion 2023-04-27T06:59:32.021529Z

no thankyou, pure CLJS+Garden for me where possible

practicalli-johnny 2023-04-25T17:06:12.730959Z

https://cljsjs.github.io/ is the project you are looking for I believe. Not all JavaScript packages are included and some may not be updated.

seancorfield 2023-04-25T17:10:16.761039Z

There's nothing to stop someone implementing npm-like functionality as a procurer for tools.deps -- it is extensible in that area -- but I suspect no one thinks it's worth the effort, since it's so hard to avoid npm when doing frontend work in general. I certainly sympathize -- I despise the whole npm tooling monstrosity -- but I've recently had to start supporting our frontend team who are all JS (React.js/Redux/Immutable/etc) and I had to learn yarn and a bunch of other stuff just to help them with their CI system (and now I'm helping them refactor and cleanup some of their legacy code... so I've also had to learn JS and some React stuff).

🙏 1