tuix-webcomponents 0.0.29 → 0.0.30
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 +13 -16
- package/custom-elements.json +2350 -2350
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -68,9 +68,6 @@ is enough. To start the request earlier, add the link to the document head:
|
|
|
68
68
|
<link rel="stylesheet" href="https://hccdn.tuix.ch/rubik_d444e2375d.css" />
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
-
There is no `loadFonts()` helper any more: injecting the stylesheet from
|
|
72
|
-
JavaScript reflowed the page once the face arrived.
|
|
73
|
-
|
|
74
71
|
## Repository setup
|
|
75
72
|
|
|
76
73
|
```bash
|
|
@@ -97,7 +94,7 @@ npm run docs:build # static export into docs/dist
|
|
|
97
94
|
```
|
|
98
95
|
|
|
99
96
|
All three are `npm --prefix docs`, so the same commands run from inside `docs/`
|
|
100
|
-
do the same thing
|
|
97
|
+
do the same thing, with one difference: `docs:install` is `npm ci`, a clean
|
|
101
98
|
install of exactly what `docs/package-lock.json` pins. Adding or bumping a
|
|
102
99
|
dependency therefore means an `npm install` inside `docs/`, to write the
|
|
103
100
|
lockfile that `docs:install` then reproduces.
|
|
@@ -108,9 +105,9 @@ German. Pages are MDX files in `docs/content/docs/` (`*.mdx` English,
|
|
|
108
105
|
`*.de.mdx` German), ordered by `meta.json` and `meta.de.json`.
|
|
109
106
|
|
|
110
107
|
The site is public-facing: it shows and documents the components, and carries no
|
|
111
|
-
contributor workflow. That lives here and in
|
|
112
|
-
|
|
113
|
-
|
|
108
|
+
contributor workflow. That lives here and in `docs/src/modules/docs/README.md`,
|
|
109
|
+
which covers how the site is put together: content locations, the live previews,
|
|
110
|
+
the framework selector and the locales.
|
|
114
111
|
|
|
115
112
|
## Building the package
|
|
116
113
|
|
|
@@ -121,15 +118,15 @@ npm run build
|
|
|
121
118
|
writes `package-build/`, and `npm run stage:package` copies that into `dist/`,
|
|
122
119
|
which is what `npm publish` ships (`files: ["dist"]`):
|
|
123
120
|
|
|
124
|
-
| Path
|
|
125
|
-
|
|
|
126
|
-
| `dist/src/index.js` + `.d.ts`
|
|
127
|
-
| `dist/src/react/index.js`
|
|
128
|
-
| `dist/assets/tuix-styles.css`
|
|
121
|
+
| Path | Entry point |
|
|
122
|
+
| ----------------------------- | ------------------------------------------------------------------- |
|
|
123
|
+
| `dist/src/index.js` + `.d.ts` | `tuix-webcomponents`, the custom elements |
|
|
124
|
+
| `dist/src/react/index.js` | `tuix-webcomponents/react`, the wrappers |
|
|
125
|
+
| `dist/assets/tuix-styles.css` | `tuix-webcomponents/dist/assets/tuix-styles.css`, the design tokens |
|
|
129
126
|
|
|
130
127
|
The two steps are separate on purpose: `dist/` is also where the site is
|
|
131
|
-
assembled, so the package build never writes it. Only the staging step does,
|
|
132
|
-
|
|
128
|
+
assembled, so the package build never writes it. Only the staging step does, and
|
|
129
|
+
that runs in `bin/publish.sh`, i.e. in the publish job, after the site has
|
|
133
130
|
already been uploaded from its own job.
|
|
134
131
|
|
|
135
132
|
The steps behind it: `cem analyze` refreshes `custom-elements.json`,
|
|
@@ -163,7 +160,7 @@ The branch decides the dist-tag, and the two paths differ:
|
|
|
163
160
|
Both paths build the bundle as `build-<short hash>@<version>.{js,css}` and
|
|
164
161
|
upload it, so every deployment is immutable. Only `latest` rewrites the
|
|
165
162
|
`Webbundle Link:` and `Styles Link:` lines under [Usage](#usage) and commits
|
|
166
|
-
them
|
|
163
|
+
them, which is why those two lines are the one place in the repository that
|
|
167
164
|
tracks the current bundle. `docs/scripts/build-bundle-links.ts` reads them at
|
|
168
165
|
docs build time rather than copying the URLs into a page, so the documentation
|
|
169
166
|
cannot fall a release behind.
|
|
@@ -201,7 +198,7 @@ The site root is the documentation, and the Storybook sidebar brand links back
|
|
|
201
198
|
to it. `scripts/build.sh` is what assembles both into `dist/` for CI.
|
|
202
199
|
|
|
203
200
|
Two builds, two folders, so neither clears the other: the site into `dist/`
|
|
204
|
-
(`scripts/build.sh
|
|
201
|
+
(`scripts/build.sh`: Storybook under `dist/storybook`, the docs export at the
|
|
205
202
|
root) and the npm package into `package-build/` (`npm run build`). `dist/` is
|
|
206
203
|
reused for the package only by `npm run stage:package`, which `bin/publish.sh`
|
|
207
204
|
runs in the publish job.
|