fix: a page in the dark color scheme, also one in an iframe, is no longer white while it loads, and test-container.mjs runs the checks with Docker.
Release / release (push) Successful in 25s

This commit is contained in:
slawek committed 2026-11-06 23:50:22 +01:00
1 parent 5e62e143b6
commit 6d365cf529
8 files changed
+192 -8

No files matched your search

+12 -4
View File
@@ -19,15 +19,15 @@ published version and imports `@koszewscy/sk-react-toolkit/server`, `/shared`, `
{ "dependencies": { "@koszewscy/sk-react-toolkit": "^0.2.0" } }
```
The web application adds the toolkit's resolve options and font plugin to its `vite.config.ts`, so
React, MUI and Emotion come from its own `node_modules`:
The web application adds the toolkit's resolve options, so React, MUI and Emotion come from its
own `node_modules`, and its font and color scheme plugins to its `vite.config.ts`:
```ts
import { font, fontChoice, TOOLKIT_RESOLVE } from '@koszewscy/sk-react-toolkit/vite'
import { colorScheme, font, fontChoice, TOOLKIT_RESOLVE } from '@koszewscy/sk-react-toolkit/vite'
import { defineConfig, loadEnv } from 'vite'
export default defineConfig(({ mode }) => ({
plugins: [react(), font(fontChoice(loadEnv(mode, import.meta.dirname)))],
plugins: [react(), font(fontChoice(loadEnv(mode, import.meta.dirname))), colorScheme()],
resolve: TOOLKIT_RESOLVE,
}))
```
@@ -94,6 +94,7 @@ API types imported by both, without the code of either: `CredentialField`, `Cred
| Export | Purpose |
| --- | --- |
| `font(choice)`, `fontChoice(env)`, `FONTS` | the font plugin of `VITE_FONT`: `cdn` (Google Fonts links, the default), `bundled` (`@fontsource/roboto`, a dependency of the application) or `none` |
| `colorScheme()` | the plugin that sets the color scheme of `appTheme`, chosen in the theme menu or by the system, on the page before its first paint, so a dark page, also one in an iframe, does not show white while it loads |
| `TOOLKIT_RESOLVE` | the resolve options that keep one copy of React, MUI and Emotion |
## Credential store
@@ -239,6 +240,13 @@ database `postgres`. `npm run build` (`build.mjs`) builds the published package
`dist/`: the code compiled to JavaScript with its declarations, the SQL of the server, README.md, CHANGELOG.md and a
`package.json` whose exports name the compiled files.
`./test-container.mjs` runs the same checks with Docker, on the engine of the docker CLI's
context, which may be remote: it sends the files git tracks, and the untracked files it does not
ignore, as the build context of `test.Dockerfile`, whose build runs the typecheck, the lint and
the package build, and runs the tests against a scratch PostgreSQL in a container on a private
network, removed afterwards. `--package <folder>` writes the packed toolkit to the folder instead,
for the tests of an application against the checkout.
## Releases
`./release.mjs` commits, tags the version of the newest CHANGELOG.md entry and pushes `main` with