@stepr/checklist 0.1.0 → 0.1.1

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.
Files changed (2) hide show
  1. package/README.md +30 -3
  2. package/package.json +3 -2
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Lightweight, framework-agnostic onboarding checklist widget for the web.
4
4
 
5
- > **Status: v0.1.0, the first public release.** It contains the checklist
5
+ > **Status: v0.1.1, an early release.** It contains the checklist
6
6
  > widget, the state controller and optional persistence. Versions follow
7
7
  > [semver](https://semver.org/) for 0.x: a **minor** release (0.2.0) may
8
8
  > contain breaking changes, a patch release won't. See the
@@ -21,12 +21,16 @@ decides when a step is complete, and progress can optionally be saved in
21
21
 
22
22
  ## Demo
23
23
 
24
+ **Live demo: <https://ahlgren1234.github.io/stepr-checklist/>**
25
+
24
26
  The [`demo/`](demo/) folder has an interactive page with no framework. It
25
27
  shows a made-up app whose onboarding steps are completed by app events,
26
28
  programmatic completion, `reset()`, `destroy()`, opt-in persistence, themes, a
27
29
  [Stepr](https://github.com/ahlgren1234/stepr) tour started from a step, and
28
30
  the README examples with copy buttons.
29
31
 
32
+ To run it locally:
33
+
30
34
  ```sh
31
35
  pnpm install
32
36
  pnpm demo # builds dist/, then serves http://localhost:4173/demo/
@@ -36,12 +40,34 @@ The demo imports the **built package** (`dist/`) through an import map, using
36
40
  the same `import … from '@stepr/checklist'` as the examples. Stepr is a
37
41
  `devDependency` used only by the demo. It is not a dependency of the package.
38
42
  `pnpm test:built` runs the demo and the README examples against `dist/` in
39
- jsdom. The demo isn't deployed anywhere. The local server
43
+ jsdom. The local server
40
44
  ([`scripts/serve-demo.mjs`](scripts/serve-demo.mjs)) listens on `127.0.0.1`
41
45
  only, and serves just the `.html`, `.css` and `.js` files in `demo/`, `dist/`
42
46
  and `node_modules/stepr/dist/`. It refuses every other path, including
43
47
  `.git`, `.env` and config files.
44
48
 
49
+ ### Deployment
50
+
51
+ Every push to `main` deploys the demo to GitHub Pages with
52
+ [`.github/workflows/pages.yml`](.github/workflows/pages.yml). The workflow can
53
+ also be started by hand from the Actions tab. It runs `pnpm check`, then
54
+ `pnpm build:pages`, which builds `dist/` and runs
55
+ [`scripts/build-pages.mjs`](scripts/build-pages.mjs) to assemble a static
56
+ site in `_site/` with no bundler:
57
+
58
+ - `index.html`, `smoke.html`, `main.js` and `demo.css` from `demo/`, at the
59
+ site root
60
+ - `dist/`: the built package's `.js` files
61
+ - `vendor/stepr/`: Stepr's `.js` files and license, copied from
62
+ `node_modules`
63
+
64
+ The script rewrites the demo's two `../` import paths to `./dist/` and
65
+ `./vendor/stepr/`. All paths are relative, so the site works under the
66
+ `/stepr-checklist/` base path. `pnpm test:built` builds the site and checks
67
+ that every stylesheet, script and module it loads exists inside it. To
68
+ preview the site, serve `_site/` with any static server. The workflow only
69
+ deploys the demo; it never publishes to npm.
70
+
45
71
  ## Quick start
46
72
 
47
73
  ```sh
@@ -527,11 +553,12 @@ pnpm test:built # run the demo and README examples against dist/ (jsdom)
527
553
  pnpm check:package # publint + attw + install/import the packed tarball in a clean consumer
528
554
  pnpm check # all of the above, as run in CI
529
555
  pnpm demo # build, then serve the demo at http://localhost:4173/demo/
556
+ pnpm build:pages # build, then assemble the GitHub Pages site in _site/
530
557
  ```
531
558
 
532
559
  `pnpm test:built` and `pnpm check:package` require a prior `pnpm build`. CI
533
560
  runs every check on pull requests and pushes to `main`; it never publishes or
534
- deploys.
561
+ deploys. A separate workflow deploys the demo (see [Deployment](#deployment)).
535
562
 
536
563
  `pnpm pack` builds `dist/` first (`prepack`). Releases are published by hand;
537
564
  see [docs/releasing.md](docs/releasing.md).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stepr/checklist",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Lightweight, framework-agnostic onboarding checklist widget for the web.",
5
5
  "keywords": [
6
6
  "onboarding",
@@ -13,7 +13,7 @@
13
13
  "framework-agnostic",
14
14
  "vanilla-js"
15
15
  ],
16
- "homepage": "https://github.com/ahlgren1234/stepr-checklist#readme",
16
+ "homepage": "https://ahlgren1234.github.io/stepr-checklist/",
17
17
  "bugs": "https://github.com/ahlgren1234/stepr-checklist/issues",
18
18
  "repository": {
19
19
  "type": "git",
@@ -59,6 +59,7 @@
59
59
  "test:watch": "vitest",
60
60
  "test:built": "vitest run --config vitest.built.config.ts",
61
61
  "demo": "pnpm build && node scripts/serve-demo.mjs",
62
+ "build:pages": "pnpm build && node scripts/build-pages.mjs",
62
63
  "check:package": "publint --strict && attw --pack . --profile esm-only && node scripts/smoke-import.mjs",
63
64
  "check": "pnpm typecheck && pnpm lint && pnpm format:check && pnpm test && pnpm build && pnpm test:built && pnpm check:package"
64
65
  }