tuix-webcomponents 0.0.26 → 0.0.28

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
@@ -71,18 +71,37 @@ is enough. To start the request earlier, add the link to the document head:
71
71
  There is no `loadFonts()` helper any more: injecting the stylesheet from
72
72
  JavaScript reflowed the page once the face arrived.
73
73
 
74
+ ## Repository setup
75
+
76
+ ```bash
77
+ npm install # the package
78
+ npm run docs:install # the documentation site, which is its own npm project
79
+ ```
80
+
81
+ `docs/` carries its own `package.json` and lockfile, so a root `npm install`
82
+ does not reach it, and `npm run docs:dev` and `npm run docs:build` fail until
83
+ `docs:install` has run once. `scripts/build.sh` runs it for the same reason
84
+ before it builds the site in CI. Nothing else needs a second install: the
85
+ package build and Storybook run off the root dependencies, and `docs/` resolves
86
+ `lit` and the component sources through them.
87
+
74
88
  ## Documentation
75
89
 
76
90
  The developer documentation site (Fumadocs, statically exported) lives in
77
91
  `docs/` as its own npm project:
78
92
 
79
93
  ```bash
80
- cd docs
81
- npm install
82
- npm run dev # http://localhost:3000/en/developers
83
- npm run build # static export into docs/dist
94
+ npm run docs:install # once, and whenever docs/package-lock.json changes
95
+ npm run docs:dev # http://localhost:3000/en/developers
96
+ npm run docs:build # static export into docs/dist
84
97
  ```
85
98
 
99
+ All three are `npm --prefix docs`, so the same commands run from inside `docs/`
100
+ do the same thing — with one difference: `docs:install` is `npm ci`, a clean
101
+ install of exactly what `docs/package-lock.json` pins. Adding or bumping a
102
+ dependency therefore means an `npm install` inside `docs/`, to write the
103
+ lockfile that `docs:install` then reproduces.
104
+
86
105
  It carries step-by-step integration guides for React/Next.js, Vue and Angular,
87
106
  and a page per component with live previews of every variant, in English and
88
107
  German. Pages are MDX files in `docs/content/docs/` (`*.mdx` English,
@@ -110,18 +129,14 @@ which is what `npm publish` ships (`files: ["dist"]`):
110
129
 
111
130
  The two steps are separate on purpose: `dist/` is also where the site is
112
131
  assembled, so the package build never writes it. Only the staging step does,
113
- and that runs inside `prepublishOnly` and `bin/publish.sh` — i.e. in the
114
- publish job, after the site has already been uploaded from its own job.
132
+ and that runs in `bin/publish.sh` — i.e. in the publish job, after the site has
133
+ already been uploaded from its own job.
115
134
 
116
135
  The steps behind it: `cem analyze` refreshes `custom-elements.json`,
117
136
  `scripts/build-react.ts` regenerates `src/react/`, `tsc -p tsconfig.publish.json`
118
137
  compiles both entry points with their declarations, `build:css` renders the
119
138
  tokens, and `tsc-esm-fix` adds the `.js` extensions Node's ESM resolver needs.
120
139
 
121
- `npm publish` re-runs build and staging through `prepublishOnly`, so a release
122
- cannot ship a stale `dist/`. `npm run publish:local` packs the same output into
123
- a linkable `local/` folder for trying it in another project.
124
-
125
140
  ## Releases
126
141
 
127
142
  Releases are automatic, from CircleCI. `bin/publish.sh` takes the newest
@@ -188,8 +203,8 @@ to it. `scripts/build.sh` is what assembles both into `dist/` for CI.
188
203
  Two builds, two folders, so neither clears the other: the site into `dist/`
189
204
  (`scripts/build.sh` — Storybook under `dist/storybook`, the docs export at the
190
205
  root) and the npm package into `package-build/` (`npm run build`). `dist/` is
191
- reused for the package only by `npm run stage:package`, which runs in the
192
- publish job.
206
+ reused for the package only by `npm run stage:package`, which `bin/publish.sh`
207
+ runs in the publish job.
193
208
 
194
209
 
195
210
  ## Tooling configs