37 lines
1.4 KiB
Markdown
37 lines
1.4 KiB
Markdown
|
|
# consumer-fixture — the drift loop, copy-pasteable
|
||
|
|
|
||
|
|
A tiny stand-in for a repo that **consumes** `@whynot/design`. It exercises the
|
||
|
|
full downstream loop — **pin → inspect → drift → update** — against this repo's
|
||
|
|
own `ir/manifest.json`, with no real npm install, so you can see exactly what a
|
||
|
|
consumer experiences.
|
||
|
|
|
||
|
|
```bash
|
||
|
|
./run.sh
|
||
|
|
```
|
||
|
|
|
||
|
|
What it shows:
|
||
|
|
|
||
|
|
1. **Inspect** — the head of `ir/INDEX.md` (the browsable catalog of the version).
|
||
|
|
2. **drift** — [`adopted.lock`](./adopted.lock) is a sample `.whynot-design.lock`
|
||
|
|
pinned to a pretend older `0.2.0` sync-point (Button changed since, TopNav added
|
||
|
|
since, tokens changed). `drift` reports those and exits `3`.
|
||
|
|
3. **drift --update** — adopts the current version as the new sync-point.
|
||
|
|
4. **drift** again — now in sync, exits `0`.
|
||
|
|
|
||
|
|
The run is **non-destructive**: `adopted.lock` is copied into a scratch dir and
|
||
|
|
only the copy is mutated.
|
||
|
|
|
||
|
|
## In a real consuming repo
|
||
|
|
|
||
|
|
You would **not** pass `--manifest`/`--lock`. The installed package supplies its
|
||
|
|
own `ir/manifest.json`, and the lock lives at `./.whynot-design.lock`:
|
||
|
|
|
||
|
|
```bash
|
||
|
|
npm i @whynot/design@0.3.0 lit # pin
|
||
|
|
npx @whynot/design drift --update # adopt a sync-point (writes .whynot-design.lock)
|
||
|
|
# ...later, after bumping the version...
|
||
|
|
npx @whynot/design drift # see what changed; exit 3 on drift
|
||
|
|
```
|
||
|
|
|
||
|
|
Full guide: [`../../CONSUMING.md`](../../CONSUMING.md).
|