Skip to content

feat: make doc-kit friendly for newcomers - #995

Closed
avivkeller wants to merge 7 commits into
mainfrom
feat/friendly-kitten
Closed

feat: make doc-kit friendly for newcomers#995
avivkeller wants to merge 7 commits into
mainfrom
feat/friendly-kitten

Conversation

@avivkeller

@avivkeller avivkeller commented Aug 4, 2026

Copy link
Copy Markdown
Member

I'm adding:

  • serve (Build + Serve + Watch)
  • bootstrap (Detect things like package name, docs path, and create a project)
  • install (Install a generator package based on it's name, e.g. doc-kit install web)

Hopefully then new consumers can just doc-kit bootstrap && doc-kit serve to get their projects up-and-running. wdyt?

@avivkeller
avivkeller requested a review from a team as a code owner August 4, 2026 03:28
@vercel

vercel Bot commented Aug 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
api-docs-tooling Error Error Aug 4, 2026 3:15pm

Request Review

@cursor

cursor Bot commented Aug 4, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Broad CLI and configuration behavior changes affect how every project resolves defaults and presets; install/bootstrap invoke the local package manager via spawnSync, which is environment-dependent but not security-critical.

Overview
Adds bootstrap, install, and serve so new projects can run doc-kit bootstrap then doc-kit serve for config, docs folder, .gitignore, generator installs, live preview, and rebuild-on-change (--static serves existing output only).

Configuration now supports extends (package specifiers or relative paths) with merge order: CLI → config file → presets → defaults. Built-in defaults drop Node.js-specific repository, baseURL, and changelog fetching; @node-core/doc-kit/config restores nodejs.org branding and URL layouts. Beta, e2e, and CI configs extend that preset.

The html generator is the public built-in name (web remains a deprecated alias). React html defaults use generic {project} titles, neutral logos, and optional GitHub/edit UI when repository / editURL are unset. generate and serve share options via createConfigurationOptions().

Docs, Playwright e2e, and getting-started are updated to document the new flow and doc-kit serve instead of external static servers.

Reviewed by Cursor Bugbot for commit 0b18b81. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4623686. Configure here.

Comment thread packages/core/bin/commands/bootstrap.mjs
Comment thread README.md
--git-ref <url> Git ref/commit URL (default: "https://github.com/nodejs/node/tree/HEAD")
-t, --target [modes...] Target generator modes (choices: "json-simple", "legacy-html", "legacy-html-all", "man-page", "legacy-json", "legacy-json-all", "addon-verify", "api-links", "orama-db", "llms-txt")
-h, --help display help for command
--config-file <path> Config file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears that this part of the modification is redundant with #984.

@avivkeller
avivkeller force-pushed the feat/friendly-kitten branch from 4623686 to 0b18b81 Compare August 4, 2026 15:15
Copilot AI lite review requested due to automatic review settings August 4, 2026 15:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@codecov

codecov Bot commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.49538% with 487 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.38%. Comparing base (e47d0ce) to head (0b18b81).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
packages/core/bin/commands/bootstrap.mjs 0.00% 186 Missing ⚠️
packages/core/bin/commands/serve.mjs 0.00% 96 Missing ⚠️
packages/core/bin/commands/install.mjs 0.00% 55 Missing ⚠️
packages/core/bin/commands/options.mjs 0.00% 39 Missing ⚠️
packages/core/src/utils/install.mjs 82.88% 32 Missing ⚠️
packages/core/src/server/index.mjs 88.78% 24 Missing and 1 partial ⚠️
packages/core/bin/commands/generate.mjs 0.00% 11 Missing ⚠️
...react/src/sitemap/utils/createPageSitemapEntry.mjs 63.15% 7 Missing ⚠️
packages/core/src/utils/configuration/index.mjs 88.46% 6 Missing ⚠️
scripts/build-docs-content.mjs 0.00% 6 Missing ⚠️
... and 9 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #995      +/-   ##
==========================================
- Coverage   89.60%   88.38%   -1.22%     
==========================================
  Files         197      213      +16     
  Lines       18418    20043    +1625     
  Branches     1724     1877     +153     
==========================================
+ Hits        16503    17716    +1213     
- Misses       1908     2319     +411     
- Partials        7        8       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Base automatically changed from refactor/node-kitten to main August 4, 2026 15:17
@avivkeller avivkeller closed this Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants