tuix-webcomponents 0.0.25 → 0.0.27

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
@@ -12,8 +12,8 @@ npm i tuix-webcomponents
12
12
 
13
13
  ### Webbundle version
14
14
 
15
- Webbundle Link: https://tuix-webcomponents.s3.eu-central-1.amazonaws.com/build-bf814e0@0.89.0.js
16
- Styles Link: https://tuix-webcomponents.s3.eu-central-1.amazonaws.com/build-bf814e0@0.89.0.css
15
+ Webbundle Link: https://tuix-webcomponents.s3.eu-central-1.amazonaws.com/build-22f6faf@0.91.1.js
16
+ Styles Link: https://tuix-webcomponents.s3.eu-central-1.amazonaws.com/build-22f6faf@0.91.1.css
17
17
 
18
18
  ### React
19
19
 
@@ -71,25 +71,46 @@ 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,
89
108
  `*.de.mdx` German), ordered by `meta.json` and `meta.de.json`.
90
109
 
91
- See `docs/src/modules/docs/README.md` for how the site is put together, and
92
- [the contributing page](docs/content/docs/contributing.mdx) for the workflow.
110
+ The site is public-facing: it shows and documents the components, and carries no
111
+ contributor workflow. That lives here and in
112
+ `docs/src/modules/docs/README.md`, which covers how the site is put together —
113
+ content locations, the live previews, the framework selector and the locales.
93
114
 
94
115
  ## Building the package
95
116
 
@@ -108,17 +129,44 @@ which is what `npm publish` ships (`files: ["dist"]`):
108
129
 
109
130
  The two steps are separate on purpose: `dist/` is also where the site is
110
131
  assembled, so the package build never writes it. Only the staging step does,
111
- and that runs inside `prepublishOnly` and `bin/publish.sh` — i.e. in the
112
- 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.
113
134
 
114
135
  The steps behind it: `cem analyze` refreshes `custom-elements.json`,
115
136
  `scripts/build-react.ts` regenerates `src/react/`, `tsc -p tsconfig.publish.json`
116
137
  compiles both entry points with their declarations, `build:css` renders the
117
138
  tokens, and `tsc-esm-fix` adds the `.js` extensions Node's ESM resolver needs.
118
139
 
119
- `npm publish` re-runs build and staging through `prepublishOnly`, so a release
120
- cannot ship a stale `dist/`. `npm run publish:local` packs the same output into
121
- a linkable `local/` folder for trying it in another project.
140
+ ## Releases
141
+
142
+ Releases are automatic, from CircleCI. `bin/publish.sh` takes the newest
143
+ `feat(`, `feat!(` or `fix(` subject out of the last ten commits and derives the
144
+ version from it:
145
+
146
+ | Commit prefix | Bump |
147
+ | ------------- | ----- |
148
+ | `feat!(` | major |
149
+ | `feat(` | minor |
150
+ | anything else | patch |
151
+
152
+ Commit subjects are linted by commitlint against
153
+ [Conventional Commits](https://www.conventionalcommits.org), so the prefix is
154
+ not optional.
155
+
156
+ The branch decides the dist-tag, and the two paths differ:
157
+
158
+ | Branch | Dist-tag | Version | Also does |
159
+ | ------------ | --------- | --------------------------------------------- | --------------------------------------------------------------------------- |
160
+ | `master` | `latest` | bumped from the commit subject, per the table | uploads the web bundle to S3, rewrites the two links below, tags `v<version>` |
161
+ | anything else| `staging` | always a patch bump off `staging` | uploads the web bundle to S3 |
162
+
163
+ Both paths build the bundle as `build-<short hash>@<version>.{js,css}` and
164
+ upload it, so every deployment is immutable. Only `latest` rewrites the
165
+ `Webbundle Link:` and `Styles Link:` lines under [Usage](#usage) and commits
166
+ them — which is why those two lines are the one place in the repository that
167
+ tracks the current bundle. `docs/scripts/build-bundle-links.ts` reads them at
168
+ docs build time rather than copying the URLs into a page, so the documentation
169
+ cannot fall a release behind.
122
170
 
123
171
  ## Linting and formatting
124
172
 
@@ -152,11 +200,11 @@ That writes `dist/storybook`, which is where the deployed site serves it from.
152
200
  The site root is the documentation, and the Storybook sidebar brand links back
153
201
  to it. `scripts/build.sh` is what assembles both into `dist/` for CI.
154
202
 
155
- Three builds, three folders, so none of them clears another: the site into
156
- `dist/` (`scripts/build.sh` — Storybook under `dist/storybook`, the docs export
157
- at the root), the npm package into `package-build/` (`npm run build`), and the
158
- dev compile into `build/` (`npm start`). `dist/` is reused for the package only
159
- by `npm run stage:package`, which runs in the publish job.
203
+ Two builds, two folders, so neither clears the other: the site into `dist/`
204
+ (`scripts/build.sh` — Storybook under `dist/storybook`, the docs export at the
205
+ root) and the npm package into `package-build/` (`npm run build`). `dist/` is
206
+ reused for the package only by `npm run stage:package`, which `bin/publish.sh`
207
+ runs in the publish job.
160
208
 
161
209
 
162
210
  ## Tooling configs
@@ -164,12 +212,3 @@ by `npm run stage:package`, which runs in the publish job.
164
212
  For most of the tools, the configuration is in the `package.json` to reduce the amount of files in your project.
165
213
 
166
214
  If you customize the configuration a lot, you can consider moving them to individual files.
167
-
168
- ## Local Demo with `web-dev-server`
169
-
170
- ```bash
171
- npm start
172
- ```
173
-
174
- To run a local development server that serves the basic demo located in `demo/index.html`
175
-