Skip to content

Commit

Permalink
docs(misc): render values correctly (#9712)
Browse files Browse the repository at this point in the history
  • Loading branch information
leosvelperez committed Apr 8, 2022
1 parent 7c7e415 commit 96db3c5
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 15 deletions.
2 changes: 1 addition & 1 deletion docs/generated/cli/affected-apps.md
Expand Up @@ -59,7 +59,7 @@ This is the configuration to use when performing tasks on projects

Type: array

Default:
Default: []

Exclude certain projects from being processed

Expand Down
2 changes: 1 addition & 1 deletion docs/generated/cli/affected-graph.md
Expand Up @@ -77,7 +77,7 @@ This is the configuration to use when performing tasks on projects

Type: array

Default:
Default: []

Exclude certain projects from being processed

Expand Down
2 changes: 1 addition & 1 deletion docs/generated/cli/affected-libs.md
Expand Up @@ -59,7 +59,7 @@ This is the configuration to use when performing tasks on projects

Type: array

Default:
Default: []

Exclude certain projects from being processed

Expand Down
2 changes: 1 addition & 1 deletion docs/generated/cli/affected.md
Expand Up @@ -77,7 +77,7 @@ This is the configuration to use when performing tasks on projects

Type: array

Default:
Default: []

Exclude certain projects from being processed

Expand Down
6 changes: 3 additions & 3 deletions docs/generated/cli/create-nx-workspace.md
Expand Up @@ -35,7 +35,7 @@ The name of the application when a preset with pregenerated app is selected

Type: string

Choices: ["nx", "angular"]
Choices: [nx, angular]

CLI to power the Nx workspace

Expand Down Expand Up @@ -75,7 +75,7 @@ Use Nx Cloud

Type: string

Choices: ["npm", "pnpm", "yarn"]
Choices: [npm, pnpm, yarn]

Default: npm

Expand All @@ -85,7 +85,7 @@ Package manager to use

Type: string

Choices: ["apps", "empty", "core", "npm", "ts", "web-components", "angular", "angular-nest", "react", "react-express", "react-native", "next", "nest", "express"]
Choices: [apps, empty, core, npm, ts, web-components, angular, angular-nest, react, react-express, react-native, next, nest, express]

Customizes the initial content of your workspace. To build your own see https://nx.dev/nx-plugin/overview#preset

Expand Down
2 changes: 1 addition & 1 deletion docs/generated/cli/format-check.md
Expand Up @@ -39,7 +39,7 @@ This is the configuration to use when performing tasks on projects

Type: array

Default:
Default: []

Exclude certain projects from being processed

Expand Down
2 changes: 1 addition & 1 deletion docs/generated/cli/format-write.md
Expand Up @@ -39,7 +39,7 @@ This is the configuration to use when performing tasks on projects

Type: array

Default:
Default: []

Exclude certain projects from being processed

Expand Down
2 changes: 1 addition & 1 deletion docs/generated/cli/print-affected.md
Expand Up @@ -71,7 +71,7 @@ This is the configuration to use when performing tasks on projects

Type: array

Default:
Default: []

Exclude certain projects from being processed

Expand Down
2 changes: 1 addition & 1 deletion docs/generated/cli/run-many.md
Expand Up @@ -53,7 +53,7 @@ This is the configuration to use when performing tasks on projects

Type: array

Default:
Default: []

Exclude certain projects from being processed

Expand Down
Expand Up @@ -18,7 +18,7 @@ export function getParameterMetadata(schema: JsonSchema): ParameterMetadata[] {
return {
name,
key: slugify(name),
value: String(value),
value: JSON.stringify(value).replace(/"/g, ''),
};
}

Expand Down
Expand Up @@ -96,7 +96,7 @@ function ParameterEnums({
Accepted values:{' '}
{potentialEnums.map((e, i) => (
<span key={'enums-' + e}>
<code>{e}</code>
<code>{JSON.stringify(e).replace(/"/g, '')}</code>
{potentialEnums.length === i + 1 ? null : ', '}
</span>
))}
Expand Down
6 changes: 4 additions & 2 deletions scripts/documentation/utils.ts
Expand Up @@ -200,11 +200,13 @@ export function generateOptionsMarkdown(command): string {
}
if (option.choices !== undefined) {
response += dedent`
Choices: [${option.choices.map((c) => `"${c}"`).join(', ')}]\n`;
Choices: [${option.choices
.map((c) => JSON.stringify(c).replace(/"/g, ''))
.join(', ')}]\n`;
}
if (option.default !== undefined && option.default !== '') {
response += dedent`
Default: ${option.default}\n`;
Default: ${JSON.stringify(option.default).replace(/"/g, '')}\n`;
}
response += dedent`
${formatDeprecated(option.description, option.deprecated)}
Expand Down

1 comment on commit 96db3c5

@vercel
Copy link

@vercel vercel bot commented on 96db3c5 Apr 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-five.vercel.app
nx.dev
nx-dev-git-master-nrwl.vercel.app
nx-dev-nrwl.vercel.app

Please sign in to comment.