Skip to content

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

Open
avivkeller wants to merge 4 commits into
refactor/node-kittenfrom
feat/friendly-kitten
Open

feat: make doc-kit friendly for newcomers#995
avivkeller wants to merge 4 commits into
refactor/node-kittenfrom
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:28am

Request Review

@cursor

cursor Bot commented Aug 4, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
New CLI runs package managers and a local HTTP server; config extends changes merge order and defaults, which can alter output for projects that relied on implicit Node.js settings without the preset.

Overview
Adds bootstrap, install, and serve so new projects can set up config, generator packages, and a live-reloading preview without extra tooling. serve includes a static file server (path traversal guards, port fallback) and debounced rebuilds on input changes; install picks the lockfile’s package manager and resolves built-in generators to npm packages.

Configuration now supports extends presets (merged under the config file; later presets win). Built-in defaults are project-neutral (project from package.json, empty changelog, optional repository/baseURL). Node.js branding and nodejs.org URL layouts move to @node-core/doc-kit/config, which beta/e2e configs and docs reference.

The html generator defaults to generic titles, {baseURL}{path}.html, and a plain ProjectName logo; GitHub nav and “Edit this page” only appear when repository and editURL are set. llms-txt / sitemap templates and defaults are similarly generic. CI/e2e/Playwright use the Node preset config and doc-kit serve --static instead of npx serve.

Reviewed by Cursor Bugbot for commit 4623686. 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.

output: opts.output,
hasHomepage: Boolean(manifest.homepage),
})
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Force writes ignored config file

Medium Severity

--force always writes doc-kit.config.mjs instead of replacing the file findExistingConfig found. Cosmiconfig prefers .doc-kitrc* and doc-kit.config.js over .mjs, so the new file can be ignored and the old config keeps winning.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 4623686. Configure here.

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.

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.

2 participants