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

docs(nxdev): make sure rendered command string includes param indication #9489

Merged
merged 1 commit into from
Mar 24, 2022
Merged
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
2 changes: 1 addition & 1 deletion docs/generated/cli/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Lists installed plugins, capabilities of installed plugins and other available p
## Usage

```bash
nx list
nx list [plugin]
```

[Install `nx` globally](/getting-started/nx-setup#install-nx) to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpx nx`.
Expand Down
2 changes: 1 addition & 1 deletion docs/generated/cli/migrate.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Creates a migrations file or runs migrations from the migrations file.
## Usage

```bash
nx migrate
nx migrate [packageAndVersion]
```

[Install `nx` globally](/getting-started/nx-setup#install-nx) to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpx nx`.
Expand Down
2 changes: 1 addition & 1 deletion docs/generated/cli/workspace-generator.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Runs a workspace generator from the tools/generators directory
## Usage

```bash
nx workspace-generator
nx workspace-generator [name]
```

[Install `nx` globally](/getting-started/nx-setup#install-nx) to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpx nx`.
Expand Down
2 changes: 1 addition & 1 deletion docs/generated/cli/workspace-lint.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Lint nx specific workspace files (nx.json, workspace.json)
## Usage

```bash
nx workspace-lint
nx workspace-lint [files..]
```

[Install `nx` globally](/getting-started/nx-setup#install-nx) to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpx nx`.
10 changes: 8 additions & 2 deletions scripts/documentation/generate-cli-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ interface ParsedCommandOption {

interface ParsedCommand {
name: string;
commandString: string;
description: string;
options?: Array<ParsedCommandOption>;
}
Expand Down Expand Up @@ -80,7 +81,11 @@ export async function generateCLIDocumentation() {
command.builder.apply
)
) {
return { name, description: command.description };
return {
name,
commandString: command.original,
description: command.description,
};
}
// Show all the options we can get from yargs
const builder = await command.builder(
Expand All @@ -92,6 +97,7 @@ export async function generateCLIDocumentation() {
return {
name,
description: command.description,
commandString: command.original,
options:
Object.keys(builderDescriptions).map((key) => ({
name: key,
Expand All @@ -117,7 +123,7 @@ ${command.description}
## Usage

\`\`\`bash
nx ${command.name}
nx ${command.commandString}
\`\`\`

[Install \`nx\` globally](/getting-started/nx-setup#install-nx) to invoke the command directly using \`nx\`, or use \`npx nx\`, \`yarn nx\`, or \`pnpx nx\`.\n`;
Expand Down