Fork me on GitHub

i miss something. When i get a look at some shadow-cljs.edn file i dont see any clojurescript version or dependence. i understand shadow-cljs use webpack. but it dont need any clojurescript api to compile clojure code?


shadow-cljs does not use webpack


the shadow-cljs version is controlled by whichever version you have installed in your package.json


and it has a default clojurescript dependency to ensure you are using a compatible version and not some 5 year old release or so


so basically the :dependencies listed in shadow-cljs.edn have [thheller/shadow-cljs "..."] added automatically


Cool Thomas thank for your explanation. I was wondering which magic was running with shadow-cljs


so shadow-cljsforce dev to use the latest clojurescript version


How does one include css from node packages so its available to my app? Is there a better way than just copying it manually from the node_modules/<package>/dist/css into resources/public/css and adding it to my index.html as an asset?


@rberger you can use any tool you like to process css. I personally mostly use node-sass but just copying might be enough as well


I don't need to process the CSS. I'm incorporating a HOC from the AWS Amplify Javascript package. I get the JS no problem with the very nice node import features of shadow-cljs. But wondering if there is an equally elegant way to incorporate the associated CSS. The manual process works, but I'm just wondering if there are other conventions or mechanisms of pulling in the CSS from node packages.


On a related note, I did get AWS Amplify Authentication integrated very nicely with re-frame using shadow-cljs. I did have to manually copy in the CSS from the AWS Amplify UI dist from the node_modules


Heh, funny the include picked CSS as the language


with node-sass I typically have a main.scss that includes all the other stuff I want. so @import "node_modules/foo/bar.css"


node-sass will then compile and minify everything together


Ah, ok, I'll look into that. I'm pretty new to the modern JS / node environment. Thanks!


a regular Makefile will do 😉


I included garden just because it was in the re-frame scaffolding. Makefiles!


if you’d like an example of using a makefile to build shadow and sass, here’s one: