Repository navigation
chore: Drop the docs server in favor of opening the files - #246
Merged
Merged
Conversation
RobinBol
force-pushed
the
chore/prettier
branch
from
October 22, 2026 15:05
c7fe6a2 to
01a7814
Compare
RobinBol
force-pushed
the
chore/docs-preview-without-serve
branch
from
October 22, 2026 15:05
598d9b9 to
8b055a7
Compare
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The preview drops per-rebuild cleanup and uses executable shims that fail on Windows.
3 open issues
What changed in this PR
This PR simplifies the local JSDoc preview tooling and reduces development dependencies without changing the Zigbee library itself.
Changes:
- Replaces the existing preview commands with a Node script that runs watch mode and a localhost HTTP server.
- Replaces
serve,watch, andconcurrentlywithhttp-serverand updates the lockfile. - Enables ECMAScript module parsing for
.mjsfiles in ESLint.
| File | Description |
|---|---|
scripts/serve-docs.mjs |
Adds documentation watching, serving, and signal handling. |
package.json |
Simplifies preview scripts and replaces dependencies. |
package-lock.json |
Updates the resolved development dependency tree. |
eslint.config.js |
Configures module parsing for .mjs scripts. |
Review effort: Balanced
RobinBol
force-pushed
the
chore/prettier
branch
from
October 23, 2026 07:31
670c7ca to
5b26951
Compare
RobinBol
force-pushed
the
chore/docs-preview-without-serve
branch
from
October 23, 2026 07:32
bd3b924 to
98eabb9
Compare
The generated docs are a static site that works straight from disk: no fetch, no XHR, no module scripts, only relative classic script tags. Checked over file:// in Chrome and Safari, with stylesheets, the sidebar filter, dark mode, syntax highlighting and deep links all working, and console output identical to serving it over http. So serve, watch and concurrently go without a replacement, along with build:clean and build:watch. Together they pulled in 148 transitive dependencies and 5 audit findings for a preview that never runs in CI; concurrently@5 is from 2020 and watch@1.0.2 from 2016. npm run docs builds and opens build/index.html with macOS open. AGENTS.md says how to view the docs elsewhere, and its lint line no longer refers to the eslint-config-athom setup that #244 removed.
RobinBol
force-pushed
the
chore/docs-preview-without-serve
branch
from
October 23, 2026 08:05
98eabb9 to
96d21d5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What
Drops the docs server.
serve,watchandconcurrentlygo without a replacement, along withbuild:cleanandbuild:watch. A newnpm run docsbuilds the docs and opens them:AGENTS.mddocuments it, and how to view the docs off macOS.Why
The generated docs need no server. They are a static site with no
fetch, no XHR, no module scripts, only relative classic<script src>tags, so they work straight from disk. Checked overfile://in Chrome and Safari: stylesheets, the sidebar filter, dark mode (includinglocalStorage), syntax highlighting, deep links and navigation all work, and the console output is identical to serving it over http.The three packages were expensive for what they did. 148 transitive dependencies and 5 of the 9 audit findings, for a preview that never runs in CI.
concurrently@5is from 2020 andwatch@1.0.2from 2016, neither released since.Rebuilding on change goes too. The old setup had no live reload either, so a change already meant a manual refresh; rerunning
npm run docsdoes the same.openis macOS only. Elsewhere it isnpm run buildand openingbuild/index.html, whichAGENTS.mdnow says.While in that block, the lint line in
AGENTS.mdstops referring to theeslint-config-athomsetup that #244 removed.Testing
npm run buildproducesbuild/index.html.npm test114 passing,lintandformat:checkclean.npm audit9 -> 4, lockfile 391 -> 241 entries.