thheller / shadow-css

CSS-in-CLJ(S)
https://github.com/thheller/shadow-css
Eclipse Public License 1.0
109 stars 10 forks source link

Introduce a `shadow-css.edn` project file #26

Open philjackson opened 6 months ago

philjackson commented 6 months ago

It would be nice to have the concept of a project file to state the configuration of a shadow-css project in much the way shadow-cljs has. Has this crossed your mind? A structure for shadow-css.edn could be something along the lines of:

{:builds
 {:frontend
  {:target-namespaces '[my.namespaces*]
   :output-dir "some/directory/css"
   :extra-colors {"primary" {"" "#293c65"}}
   :extra-aliases {:animate-none {:animation "none"}
                   :animate-spin {:animation "spin 1s linear infinite"}}}}}

Then shadow.css.runner or similar could provide helpers like watch, once etc.

Let me know what you think and I can knock something up.

thheller commented 6 months ago

Yes, this is something I eventually want to have.

No idea on the config format though. I kinda like the flexibility of the Clojure API, so going back to a EDN format seems limiting. I do want to automate some of the repetition though. No need for everything to be repeated in every project so verbosely.