docs: add git submodule installation and usage instructions

README gets a full Installation section with per-target setup
(Babashka, shadow-cljs, Squint) plus CSS linking and updating.
AGENTS.md gets a compact summary for agent context.
This commit is contained in:
Florian Schroedl
2026-03-11 16:57:37 +01:00
parent e01cb075c6
commit a7a57f6f5f
2 changed files with 102 additions and 1 deletions

View File

@@ -2,6 +2,26 @@
A cross-target component library for Clojure, ClojureScript (Replicant), and Squint (Eucalypt). Components are `.cljc` files using reader conditionals. CSS is generated from EDN tokens via Babashka.
## Installation (Git Submodule)
This library is designed to be consumed as a git submodule. The consuming project adds `lib/ui/src` to its classpath and links/copies `dist/theme.css`.
```sh
# Add to a project
git submodule add https://gitea.florianschroedl.com/floscr/clj-ui-framework.git lib/ui
git submodule update --init
```
**Classpath setup** — add `lib/ui/src` to `:paths` in the consumer's `bb.edn`, `deps.edn`, `shadow-cljs.edn`, or `squint.edn`:
```edn
{:paths ["src" "lib/ui/src"]}
```
**CSS setup** — copy or symlink `lib/ui/dist/theme.css` into the consumer's public directory and include via `<link>` tag. If tokens are customized, regenerate with `cd lib/ui && bb build-theme`.
**Updating**`git submodule update --remote lib/ui`, then rebuild theme if needed.
## Project Structure
```