From 6b68c1aaa282205eb4d47dbc81909c11851f7e06 Mon Sep 17 00:00:00 2001 From: Wassim Chegham <1699357+manekinekko@users.noreply.github.com> Date: Thu, 24 Feb 2022 18:46:37 +0100 Subject: docs: auto-generate npm usage for each command (#4450) Closes #4189 * docs: auto-generate synopsis sections * feat: improve usage auto-generation' * chore: auto-generate npm usage for each command * docs: print default usage when usage is missing * docs: add special case for npx * fix: remove optional chaining --- docs/content/commands/npm-init.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'docs/content/commands/npm-init.md') diff --git a/docs/content/commands/npm-init.md b/docs/content/commands/npm-init.md index e9212a37e..d9c03aef4 100644 --- a/docs/content/commands/npm-init.md +++ b/docs/content/commands/npm-init.md @@ -6,13 +6,23 @@ description: Create a package.json file ### Synopsis + + + + ```bash -npm init [--yes|-y|--scope] -npm init <@scope> (same as `npm exec <@scope>/create`) -npm init [<@scope>/] (same as `npm exec [<@scope>/]create-`) -npm init [-w ] [args...] +npm init [--force|-f|--yes|-y|--scope] +npm init <@scope> (same as `npx <@scope>/create`) +npm init [<@scope>/] (same as `npx [<@scope>/]create-`) + +aliases: create, innit ``` + + + + + ### Description `npm init ` can be used to set up a new or existing npm -- cgit v1.2.3