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 #1891

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 @@ -8,8 +8,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
14 changes: 6 additions & 8 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 \
man/man1/npx.1

Expand Down Expand Up @@ -49,9 +49,7 @@ uninstall:
mandocs: $(mandocs)

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

docs: mandocs htmldocs

Expand All @@ -68,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 @@ -80,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 Expand Up @@ -136,4 +134,4 @@ release: gitclean ls-ok markedclean marked-manclean docs-clean docs
sandwich:
@[ $$(whoami) = "root" ] && (echo "ok"; echo "ham" > sandwich) || (echo "make it yourself" && exit 13)

.PHONY: all latest install dev link docs clean uninstall test man docs-clean docclean release ls-ok realclean
.PHONY: all latest install dev link docs clean uninstall test man docs-clean docsclean release ls-ok realclean
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": "v6",
"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 @@ -87,7 +83,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/npm-team)
* [npm publish](/cli-commands/npm-publish)
* [npm config](/cli-commands/npm-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/npm-config)
* [npm config](/commands/npm-config)
* [npmrc](/configuring-npm/npmrc)
* [npm owner](/cli-commands/npm-owner)
* [npm whoami](/cli-commands/npm-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 @@ -131,6 +127,6 @@ configuration setting.

### See Also

* [npm install](/cli-commands/npm-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
npm bin [-g|--global]
Expand All @@ -19,8 +15,8 @@ Print the folder where npm will install executables.

### See Also

* [npm prefix](/cli-commands/npm-prefix)
* [npm root](/cli-commands/npm-root)
* [npm prefix](/commands/npm-prefix)
* [npm root](/commands/npm-root)
* [npm folders](/configuring-npm/folders)
* [npm config](/cli-commands/npm-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
section: 1
description: Bugs for a package in a web browser maybe
---

# npm-bugs(1)

## Bugs for a package in a web browser maybe

### Synopsis
```bash
npm bugs [<pkgname>]
Expand Down Expand Up @@ -41,10 +37,10 @@ The base URL of the npm package registry.

### See Also

* [npm docs](/cli-commands/npm-docs)
* [npm view](/cli-commands/npm-view)
* [npm publish](/cli-commands/npm-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/npm-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-build
section: 1
description: Build a package
---

# npm-build(1)

## Build a package

### Synopsis
```shell
npm build [<package-folder>]
Expand All @@ -28,7 +24,7 @@ directly, run:

### See Also

* [npm install](/cli-commands/npm-install)
* [npm link](/cli-commands/npm-link)
* [npm install](/commands/npm-install)
* [npm link](/commands/npm-link)
* [npm scripts](/using-npm/scripts)
* [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-bundle
section: 1
description: REMOVED
---

# npm-bundle(1)

## REMOVED

### Description

The `npm bundle` command has been removed in 1.0, for the simple reason
Expand All @@ -18,4 +14,4 @@ Just use `npm install` now to do what `npm bundle` used to do.

### See Also

* [npm install](/cli-commands/npm-install)
* [npm install](/commands/npm-install)
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 @@ -82,10 +78,10 @@ The root cache folder.
### See Also

* [npm folders](/configuring-npm/folders)
* [npm config](/cli-commands/npm-config)
* [npm config](/commands/npm-config)
* [npmrc](/configuring-npm/npmrc)
* [npm install](/cli-commands/npm-install)
* [npm publish](/cli-commands/npm-publish)
* [npm pack](/cli-commands/npm-pack)
* [npm install](/commands/npm-install)
* [npm publish](/commands/npm-publish)
* [npm pack](/commands/npm-pack)
* https://npm.im/cacache
* https://npm.im/pacote
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
npm ci
Expand Down Expand Up @@ -45,7 +41,7 @@ cache:

### Description

This command is similar to [`npm install`](/cli-commands/npm-install), except it's meant to be used in
This command is similar to [`npm install`](/commands/npm-install), except it's meant to be used in
automated environments such as test platforms, continuous integration, and
deployment -- or any situation where you want to make sure you're doing a clean
install of your dependencies. It can be significantly faster than a regular npm
Expand All @@ -63,5 +59,5 @@ In short, the main differences between using `npm install` and `npm ci` are:

### See Also

* [npm install](/cli-commands/npm-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
source <(npm completion)
Expand Down Expand Up @@ -39,4 +35,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
npm config set <key> <value> [-g|--global]
Expand Down Expand Up @@ -79,7 +75,7 @@ global config.
### See Also

* [npm folders](/configuring-npm/folders)
* [npm config](/cli-commands/npm-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
npm dedupe
Expand Down Expand Up @@ -62,6 +58,6 @@ result in new modules being installed.

### See Also

* [npm ls](/cli-commands/npm-ls)
* [npm update](/cli-commands/npm-update)
* [npm install](/cli-commands/npm-install)
* [npm ls](/commands/npm-ls)
* [npm update](/commands/npm-update)
* [npm install](/commands/npm-install)
Loading