This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-10-05
Channels
- # announcements (2)
- # babashka (9)
- # bangalore-clj (4)
- # beginners (20)
- # calva (5)
- # cider (1)
- # clara (2)
- # clojure (11)
- # clojure-italy (2)
- # clojure-spec (11)
- # clojure-uk (4)
- # clojurescript (34)
- # clojutre (7)
- # code-reviews (5)
- # cursive (3)
- # datascript (7)
- # fulcro (7)
- # graalvm (8)
- # jackdaw (1)
- # malli (1)
- # nrepl (4)
- # off-topic (225)
- # reagent (23)
- # reitit (14)
- # remote-jobs (1)
- # ring-swagger (1)
- # shadow-cljs (19)
- # tools-deps (10)
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?
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
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 https://github.com/omnyway-labs/re-frame-re-com-amplify-shadow-cljs
with node-sass I typically have a main.scss
that includes all the other stuff I want. so @import "node_modules/foo/bar.css"
Ah, ok, I'll look into that. I'm pretty new to the modern JS / node environment. Thanks!
if you’d like an example of using a makefile to build shadow and sass, here’s one: https://github.com/dazld/shadow-cljs-sass/blob/master/resources/leiningen/new/shadow_cljs_sass/Makefile
https://github.com/dazld/shadow-cljs-sass/blob/master/resources/leiningen/new/shadow_cljs_sass/main.scss and this is where sass is importing normalize.scss
from npm