Checkout webpack at the pinned commit
webpack-doc-kit reads type definitions from a local After this step your working tree should look like:
webpack/ directory. Read the pinned commit SHA from HEAD_COMMIT and check out that exact revision.Install dependencies
Install all npm dependencies using This installs runtime dependencies including
npm ci to reproduce the exact versions recorded in the lockfile.typedoc, typedoc-plugin-markdown, @node-core/doc-kit, webpack, and semver, as well as dev dependencies for linting and formatting.Generate Markdown
Run the Internally this runs:TypeDoc reads
generate-docs script to invoke TypeDoc and produce Markdown output.webpack/types.d.ts, runs the typedoc-plugin-markdown, plugins/processor.mjs, and plugins/theme/index.mjs plugins, and writes Markdown files to pages/v5.x/.Build HTML output
Run the This runs both stages in sequence:The The final HTML output is written to the
build script to generate Markdown and then convert it to HTML in one step.build-html script calls @node-core/doc-kit:out/ directory. Open out/index.html in a browser to preview the generated documentation site.Available scripts
| Script | Description |
|---|---|
npm run generate-docs | Generate Markdown from webpack types |
npm run build-html | Convert Markdown to HTML |
npm run build | Generate docs and build HTML |
npm run lint | Run ESLint |
npm run format:check | Check Prettier formatting |
What runs in CI
On every pull request, theci.yml workflow:
- Installs dependencies and runs
npm run lint && npm run format:check - Checks out webpack at the commit in
HEAD_COMMIT, runsnpm run generate-docs, and verifies that thepages/directory has no uncommitted changes
pages/ is out of date, CI will print a diff and fail. Run npm run generate-docs locally and commit the updated files before pushing.