biff.dev.girouette

Helper functions for Girouette (https://github.com/green-coder/girouette).

Most of this code has been adapted from
https://github.com/green-coder/girouette/blob/master/lib/processor/src/girouette/processor.clj.
The main addition is that write-css accepts an applied-classes parameter.

garden-fn

(garden-fn {:keys [components color-map font-family-map]})
Wrapper around girouette.tw.core/make-api.

Merges your options with the defaults. Returns the class-name->garden
function.

write-css

(write-css {:keys [output-file verbose paths exts garden-fn applied-classes], :or {verbose true, exts [".clj" ".cljc" ".cljs"], paths ["src"]}})
Scan your source code for certain classes and generate CSS files for them.

paths:           The root directories for source code files to scan.
exts:            Only files ending with one of these extensions will be
                 scanned.
garden-fn:       A function that takes a class and returns a garden data
                 structure. See [[garden-fn]].
output-file:     The path to write the generated CSS to.
applied-classes: A map from classes (aliases) to collections of other
                 classes. For example, {"btn" ["p-2" "bg-blue-200"]}
verbose:         If true, print the classes that have been parsed from your
                 source code.