@livepeer/design-system 1.1.1 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -8,10 +8,55 @@ Visit [https://livepeer-design-system.vercel.app/](https://livepeer-design-syste
8
8
 
9
9
  ## Usage
10
10
 
11
+ ```bash
12
+ pnpm add @livepeer/design-system
11
13
  ```
12
- yarn add @livepeer/design-system
14
+
15
+ ## Prerequisites
16
+
17
+ - **Node ≥ 20** — see `.nvmrc` (use `nvm use` or `fnm use` to activate)
18
+ - **pnpm** — managed via [corepack](https://nodejs.org/api/corepack.html). Run `corepack enable` once, then the correct pnpm version activates automatically from the `packageManager` field in `package.json`.
19
+
20
+ ## Local development
21
+
22
+ ### Running the docs site
23
+
24
+ ```bash
25
+ pnpm install
26
+ pnpm dev # docs site at http://localhost:3001
27
+ ```
28
+
29
+ ### Testing changes in consumer apps
30
+
31
+ The design system is consumed by apps such as the [Livepeer Explorer](https://github.com/livepeer/explorer). Use [yalc](https://github.com/wclr/yalc) to test local changes against one or more consumers before publishing — it copies files into each consumer's `node_modules` rather than symlinking, which avoids the duplicate React instance / "Invalid hook call" errors you get from `pnpm link`.
32
+
33
+ ```bash
34
+ # one-time install
35
+ npm i -g yalc
36
+
37
+ # first-time publish from design-system (populates ~/.yalc/packages)
38
+ pnpm run ds:build
39
+ yalc publish
40
+
41
+ # one-time, in each consumer app
42
+ yalc add @livepeer/design-system
43
+ pnpm install
44
+
45
+ # in design-system, after each change
46
+ pnpm run ds:build && yalc push
13
47
  ```
14
48
 
15
- ## License
49
+ `yalc publish` puts the package in your local yalc store so consumers can `yalc add` it. `yalc push` rebuilds the store entry *and* propagates the new build to every consumer that has already added it. To unlink: run `yalc remove @livepeer/design-system` in each consumer and restore the original dependency version.
50
+
51
+ For a faster dev loop, run tsup in watch mode and push manually when you want to test:
52
+
53
+ ```bash
54
+ # terminal 1: rebuild on save
55
+ tsup --watch
56
+
57
+ # terminal 2: sync to consumers
58
+ yalc push
59
+ ```
16
60
 
17
- Licensed under the [MIT](./LICENSE) license.
61
+ > [!TIP]
62
+ > Next.js sometimes ignores changes inside `node_modules`. If HMR doesn't fire after `yalc push`, touch a source file in the consumer app or restart its dev server.