This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-12-11
Channels
- # adventofcode (108)
- # announcements (4)
- # aws (11)
- # babashka (39)
- # beginners (199)
- # calva (12)
- # clj-kondo (17)
- # cljs-dev (1)
- # clojure (115)
- # clojure-dev (9)
- # clojure-europe (98)
- # clojure-italy (17)
- # clojure-nl (4)
- # clojure-norway (3)
- # clojure-seattle (7)
- # clojure-sweden (6)
- # clojure-switzerland (5)
- # clojure-uk (15)
- # clojurescript (41)
- # code-reviews (36)
- # conjure (7)
- # datomic (1)
- # emacs (1)
- # events (1)
- # fulcro (26)
- # graalvm (2)
- # helix (35)
- # jackdaw (2)
- # jobs (9)
- # jobs-discuss (5)
- # lambdaisland (2)
- # meander (24)
- # off-topic (80)
- # pathom (22)
- # pedestal (1)
- # portal (20)
- # re-frame (3)
- # releases (1)
- # reveal (13)
- # rewrite-clj (1)
- # shadow-cljs (8)
- # specter (5)
- # sql (4)
There is a discussion in reagent channel https://clojurians.slack.com/archives/C0620C0C8/p1606990103333000
No cljs build tool I know of handles asset imports. So you’ll need to include the CSS manually
so not a library, obviously, as I said, but also not even a package. I don't have to publish it and only have to work inside our own django application.
and I am fully aware of webpacks all bloated features are not part of all other bundler's features and I am glad for this because I don't like webpack
but I can't really expect people who will use my component internally to the react app, to then go to the django template file and inject the required css lines
similarly, it is not really a good idea to include the css for components that are not present, so if they remove the component, how can I make sure they remove the css from the html templates?
it shows that clojure is still mostly about backend, because I expect if your backend is clojure, this just goes to a bunch of other backend scripts. E.g. I could use some django plugin
And how does django find the css? My recollection is fuzzy here, but I'm sure there's a manifest you can generate.
There is a thing called collectstatic that needs to run before deploy. But even that is not the defacto standard or anything, and people do all kinds of weird things, like in php. At least that's my impression
Django is pretty standardized, it's not as wild west as php. Although that's rounding up with things like composer.
https://docs.djangoproject.com/en/3.1/ref/contrib/staticfiles/#django-admin-collectstatic
https://docs.djangoproject.com/en/3.1/ref/settings/#std:setting-STATICFILES_DIRS can have your library added to it, and you're good to go.
Sorry, I realized in the meantime that I am coming at this from the wrong angle. Let me try differently: I would like to not have to consciously think about including or not including css dependencies of my dependencies.
That's OK. Most of what I ever ask is implicit. I like Clojure's melting pot because we're all so different and have very little shared background. Opens us up to new ideas.