create-grist-widget 0.2.6 → 0.2.8
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/package.json
CHANGED
package/template/README.md
CHANGED
|
@@ -30,6 +30,30 @@ This is the **source** template. It is consumed two ways:
|
|
|
30
30
|
standalone `pnpm install` (pnpm 11) exits cleanly; inside the monorepo it's
|
|
31
31
|
ignored (the root workspace governs).
|
|
32
32
|
|
|
33
|
+
### Live preview inside the monorepo (this template's own showcase)
|
|
34
|
+
|
|
35
|
+
This repo also deploys this template's own **unmodified** source to its own
|
|
36
|
+
GitHub Pages — a live showcase of exactly what `npm create grist-widget`
|
|
37
|
+
scaffolds, at `https://arthurblanchon.github.io/grist-widget-sdk/template/`.
|
|
38
|
+
Same workflow every widget already uses:
|
|
39
|
+
|
|
40
|
+
- Push template changes to the persistent `dev/template-showcase` branch —
|
|
41
|
+
every push auto-deploys a live preview at `.../template/dev/` that
|
|
42
|
+
self-reloads a few seconds later, same as a scaffolded widget's own `dev`
|
|
43
|
+
channel. Kept around permanently (not deleted after each round), so
|
|
44
|
+
`.../template/dev/` is always live to preview whatever's currently being
|
|
45
|
+
iterated on here.
|
|
46
|
+
- Ready to release? **Bump `packages/create-grist-widget/package.json`'s
|
|
47
|
+
version**, open a PR from your feature branch into `main`, and merge —
|
|
48
|
+
merging is what actually publishes `.../template/v<version>/` +
|
|
49
|
+
`.../template/latest/` (and a real `create-grist-widget` npm release,
|
|
50
|
+
since that package embeds this template verbatim — see
|
|
51
|
+
`scripts/build-template.mjs`). Merging without a version bump publishes
|
|
52
|
+
nothing (same idempotent-skip rule as every other deploy pipeline here).
|
|
53
|
+
|
|
54
|
+
See `scripts/deploy/template-showcase.mjs` + `.github/workflows/
|
|
55
|
+
deploy-template-showcase.yml` (monorepo root) for the pipeline itself.
|
|
56
|
+
|
|
33
57
|
## Deployment
|
|
34
58
|
|
|
35
59
|
A bundled GitHub Actions workflow (`.github/workflows/deploy.yml` +
|
|
@@ -11,7 +11,7 @@ import { Button } from "@/components/ui/button"
|
|
|
11
11
|
// which is why the version list is fetched from a fixed absolute URL rather
|
|
12
12
|
// than a path relative to wherever this happens to be deployed.
|
|
13
13
|
const VERSIONS_URL =
|
|
14
|
-
"https://arthurblanchon.github.io/grist-widget-sdk/versions.json"
|
|
14
|
+
"https://arthurblanchon.github.io/grist-widget-sdk/template/versions.json"
|
|
15
15
|
|
|
16
16
|
type ReleasedVersion = {
|
|
17
17
|
version: string
|
|
@@ -136,7 +136,7 @@ git push origin dev`}</code>
|
|
|
136
136
|
</span>
|
|
137
137
|
</div>
|
|
138
138
|
<a
|
|
139
|
-
href={`https://arthurblanchon.github.io/grist-widget-sdk/v${v.version}/`}
|
|
139
|
+
href={`https://arthurblanchon.github.io/grist-widget-sdk/template/v${v.version}/`}
|
|
140
140
|
className="text-sm underline underline-offset-4 hover:text-foreground"
|
|
141
141
|
>
|
|
142
142
|
Preview
|