Skip to content

Commit

Permalink
Auto-generate 'npm help 7 config' from actual definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Mar 18, 2021
1 parent 6598bfe commit 68db124
Show file tree
Hide file tree
Showing 3 changed files with 801 additions and 634 deletions.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ docs-clean:

## build-time dependencies for the documentation
dev-deps:
node bin/npm-cli.js install --only=dev --no-audit --ignore-scripts
node bin/npm-cli.js install --no-audit --ignore-scripts

## targets for man files, these are encouraged to be only built by running `make docs` or `make mandocs`
man/man1/%.1: docs/content/commands/%.md scripts/docs-build.js
Expand All @@ -68,6 +68,11 @@ man/man7/%.7: docs/content/using-npm/%.md scripts/docs-build.js
@[ -d man/man7 ] || mkdir -p man/man7
node scripts/docs-build.js $< $@

# Any time the config definitions description changes, automatically
# update the documentation to account for it
docs/content/using-npm/config.md: scripts/config-doc.js lib/utils/config/*.js
node scripts/config-doc.js

test: dev-deps
node bin/npm-cli.js test

Expand Down
Loading

0 comments on commit 68db124

Please # to comment.