Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,18 @@ comparators](docs/contributing/comparators.md) — live under

The three flags `-i` (input), `-t` (target generator), and `-o` (output directory) are effectively required. Without them the tool either crashes or silently does nothing.

3. **View the generated output**
3. **Preview the generated output**

```bash
npx serve out
node packages/cli/bin/cli.mjs preview
```

`preview` serves the existing output directory (`./out` by default) at
`http://localhost:3000`. Passing any `generate` option makes it build
first — for example, the command in step 2 with `generate` swapped for
`preview` rebuilds and then serves. It doesn't watch for changes, so run
it again after editing.

4. **Use debug logging**

Add `--log-level debug` before the `generate` subcommand to see the full pipeline trace:
Expand Down
4 changes: 3 additions & 1 deletion docs/contributing/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ either side of the command name (`doc-kit --log-level debug my-command` or
testing in `@doc-kit/core`, with its tests in a `__tests__` directory next
to it.
- **Document it** with a section on the [CLI page](../cli.md) (`docs/cli.md`),
using the same option-list format as the existing commands, and in
using the same option-list format as the existing commands; with a
`### <command>` section in the root `README.md`, showing the example
invocation followed by the command's full `--help` output; and in
`packages/cli/README.md` if it changes how people use the package. If it
adds a flag that sets configuration, name the key it sets, as the
`generate` options do.
Expand Down
Loading