Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the documentation framework for v7 #1915

Closed
wants to merge 11 commits into from
Closed
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
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ npm-debug.log
/test/packages/test-package/random-data.txt
/test/root
/node_modules/.bin
/docs/public/
/docs/.cache/
/docs/output/
/docs/node_modules/
/man/
/npmrc
Expand Down
11 changes: 5 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ BRANCH = $(shell git rev-parse --abbrev-ref HEAD)

markdowns = $(shell find docs -name '*.md' | grep -v 'index') README.md

cli_mandocs = $(shell find docs/content/cli-commands -name '*.md' \
cli_mandocs = $(shell find docs/content/commands -name '*.md' \
|sed 's|.md|.1|g' \
|sed 's|docs/content/cli-commands/|man/man1/|g' ) \
|sed 's|docs/content/commands/|man/man1/|g' ) \
man/man1/npm-README.1

files_mandocs = $(shell find docs/content/configuring-npm -name '*.md' \
Expand Down Expand Up @@ -49,8 +49,7 @@ mandocs: $(mandocs)

htmldocs:
cd docs && node ../bin/npm-cli.js install --legacy-peer-deps --no-audit && \
node ../bin/npm-cli.js run build:static >&2 && \
rm -rf node_modules .cache public/*js public/*json public/404* public/page-data public/manifest*
node ../bin/npm-cli.js run build >&2

docs: mandocs htmldocs

Expand All @@ -67,7 +66,7 @@ docs-clean:
.building_marked-man \
man \
docs/node_modules \
docs/public \
docs/output \
docs/.cache

## build-time tools for the documentation
Expand All @@ -79,7 +78,7 @@ man/man1/npm-README.1: README.md scripts/docs-build.js package.json $(build-doc-
@[ -d man/man1 ] || mkdir -p man/man1
node scripts/docs-build.js $< $@

man/man1/%.1: docs/content/cli-commands/%.md scripts/docs-build.js package.json $(build-doc-tools)
man/man1/%.1: docs/content/commands/%.md scripts/docs-build.js package.json $(build-doc-tools)
@[ -d man/man1 ] || mkdir -p man/man1
node scripts/docs-build.js $< $@

Expand Down
22 changes: 0 additions & 22 deletions docs/LICENSE

This file was deleted.

5 changes: 5 additions & 0 deletions docs/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"github_repo": "npm/cli",
"github_branch": "latest",
"github_path": "docs/content"
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
---
section: cli-commands
title: npm-access
section: 1
description: Set access level on published packages
---

# npm-access(1)

## Set access level on published packages

### Synopsis

```bash
Expand Down Expand Up @@ -88,7 +84,7 @@ Management of teams and team memberships is done with the `npm team` command.
### See Also

* [`libnpmaccess`](https://npm.im/libnpmaccess)
* [npm team](/cli-commands/team)
* [npm publish](/cli-commands/publish)
* [npm config](/cli-commands/config)
* [npm team](/commands/npm-team)
* [npm publish](/commands/npm-publish)
* [npm config](/commands/npm-config)
* [npm registry](/using-npm/registry)
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
---
section: cli-commands
---
title: npm-adduser
description: Set access level on published packages
section: 1
description: Add a registry user account
---

# npm-adduser(1)

## Add a registry user account

### Synopsis

```bash
Expand Down Expand Up @@ -89,7 +85,7 @@ username/password entry in legacy npm.
### See Also

* [npm registry](/using-npm/registry)
* [npm config](/cli-commands/config)
* [npm config](/commands/npm-config)
* [npmrc](/configuring-npm/npmrc)
* [npm owner](/cli-commands/owner)
* [npm whoami](/cli-commands/whoami)
* [npm owner](/commands/npm-owner)
* [npm whoami](/commands/npm-whoami)
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
---
section: cli-commands
title: npm-audit
section: 1
description: Run a security audit
---

# npm-audit(1)

## Run a security audit

### Synopsis

```bash
Expand Down Expand Up @@ -193,6 +189,6 @@ $ npm audit --audit-level=moderate

### See Also

* [npm install](/cli-commands/install)
* [npm install](/commands/npm-install)
* [package-locks](/configuring-npm/package-locks)
* [config](/using-npm/config)
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
---
section: cli-commands
title: npm-bin
section: 1
description: Display npm bin folder
---

# npm-bin(1)

## Display npm bin folder

### Synopsis

```bash
Expand All @@ -20,8 +16,8 @@ Print the folder where npm will install executables.

### See Also

* [npm prefix](/cli-commands/prefix)
* [npm root](/cli-commands/root)
* [npm prefix](/commands/npm-prefix)
* [npm root](/commands/npm-root)
* [npm folders](/configuring-npm/folders)
* [npm config](/cli-commands/config)
* [npm config](/commands/npm-config)
* [npmrc](/configuring-npm/npmrc)
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
---
section: cli-commands
title: npm-bugs
description: Bugs for a package in a web browser maybe
section: 1
description: Report bugs for a package in a web browser
---

# npm-bugs(1)

## Report bugs for a package in a web browser

### Synopsis

```bash
Expand Down Expand Up @@ -46,10 +42,10 @@ The base URL of the npm package registry.

### See Also

* [npm docs](/cli-commands/docs)
* [npm view](/cli-commands/view)
* [npm publish](/cli-commands/publish)
* [npm docs](/commands/npm-docs)
* [npm view](/commands/npm-view)
* [npm publish](/commands/npm-publish)
* [npm registry](/using-npm/registry)
* [npm config](/cli-commands/config)
* [npm config](/commands/npm-config)
* [npmrc](/configuring-npm/npmrc)
* [package.json](/configuring-npm/package-json)
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
---
section: cli-commands
title: npm-cache
section: 1
description: Manipulates packages cache
---

# npm-cache(1)

## Manipulates packages cache

### Synopsis

```bash
Expand Down Expand Up @@ -86,11 +82,11 @@ The root cache folder.
### See Also

* [npm folders](/configuring-npm/folders)
* [npm config](/cli-commands/config)
* [npm config](/commands/npm-config)
* [npmrc](/configuring-npm/npmrc)
* [npm install](/cli-commands/install)
* [npm publish](/cli-commands/publish)
* [npm pack](/cli-commands/pack)
* [npm install](/commands/npm-install)
* [npm publish](/commands/npm-publish)
* [npm pack](/commands/npm-pack)
* https://npm.im/cacache
* https://npm.im/pacote
* https://npm.im/@npmcli/arborist
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
---
section: cli-commands
title: npm-ci
section: 1
description: Install a project with a clean slate
---

# npm-ci(1)

## Install a project with a clean slate

### Synopsis

```bash
Expand Down Expand Up @@ -71,5 +67,5 @@ cache:

### See Also

* [npm install](/cli-commands/install)
* [npm install](/commands/npm-install)
* [package-locks](/configuring-npm/package-locks)
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
---
section: cli-commands
title: npm-completion
section: 1
description: Tab Completion for npm
---

# npm-completion(1)

## Tab Completion for npm

### Synopsis

```bash
Expand Down Expand Up @@ -40,4 +36,4 @@ completions based on the arguments.
### See Also

* [npm developers](/using-npm/developers)
* [npm](/cli-commands/npm)
* [npm](/commands/npm)
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
---
section: cli-commands
title: npm-config
section: 1
description: Manage the npm configuration files
---

# npm-config(1)

## Manage the npm configuration files

### Synopsis

```bash
Expand Down Expand Up @@ -87,7 +83,7 @@ global config.
### See Also

* [npm folders](/configuring-npm/folders)
* [npm config](/cli-commands/config)
* [npm config](/commands/npm-config)
* [package.json](/configuring-npm/package-json)
* [npmrc](/configuring-npm/npmrc)
* [npm](/cli-commands/npm)
* [npm](/commands/npm)
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
---
section: cli-commands
title: npm-dedupe
section: 1
description: Reduce duplication
---

# npm-dedupe(1)

## Reduce duplication

### Synopsis

```bash
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
---
section: cli-commands
title: npm-deprecate
section: 1
description: Deprecate a version of a package
---
# npm-deprecate(1)

## Deprecate a version of a package

### Synopsis
```bash
Expand All @@ -32,5 +29,5 @@ format an empty string.

### See Also

* [npm publish](/cli-commands/publish)
* [npm publish](/commands/npm-publish)
* [npm registry](/using-npm/registry)
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
---
section: cli-commands
---
title: npm-dist-tag
section: 1
description: Modify package distribution tags
---

# npm-dist-tag(1)

## Modify package distribution tags


### Synopsis
```bash
npm dist-tag add <pkg>@<version> [<tag>]
Expand Down Expand Up @@ -92,9 +87,9 @@ begin with a number or the letter `v`.

### See Also

* [npm publish](/cli-commands/publish)
* [npm install](/cli-commands/install)
* [npm dedupe](/cli-commands/dedupe)
* [npm publish](/commands/npm-publish)
* [npm install](/commands/npm-install)
* [npm dedupe](/commands/npm-dedupe)
* [npm registry](/using-npm/registry)
* [npm config](/cli-commands/config)
* [npm config](/commands/npm-config)
* [npmrc](/configuring-npm/npmrc)
Loading