diff --git a/docs/angular/api-workspace/npmscripts/list-plugin.md b/docs/angular/api-workspace/npmscripts/list-plugin.md deleted file mode 100644 index 8faaeb921d..0000000000 --- a/docs/angular/api-workspace/npmscripts/list-plugin.md +++ /dev/null @@ -1,41 +0,0 @@ -# list [plugin] - -Lists installed plugins, capabilities of installed plugins and other available plugins. - -## Usage - -```bash -nx list [plugin] -``` - -Install `@nrwl/cli` globally to invoke the command directly using `nx`, or use `npm run nx` or `yarn nx`. - -### Examples - -List the plugins installed in the current workspace: - -```bash -nx list -``` - -List the schematics and builders available in the `@nrwl/web` plugin if it is installed (If the plugin is not installed `nx` will show advice on how to add it to your workspace): - -```bash -nx list @nrwl/web -``` - -## Options - -### help - -Show help - -### plugin - -Default: `null` - -The name of an installed plugin to query - -### version - -Show version number diff --git a/docs/angular/api-workspace/npmscripts/affected-apps.md b/docs/angular/nx-commands/affected-apps.md similarity index 100% rename from docs/angular/api-workspace/npmscripts/affected-apps.md rename to docs/angular/nx-commands/affected-apps.md diff --git a/docs/angular/api-workspace/npmscripts/affected-build.md b/docs/angular/nx-commands/affected-build.md similarity index 100% rename from docs/angular/api-workspace/npmscripts/affected-build.md rename to docs/angular/nx-commands/affected-build.md diff --git a/docs/angular/api-workspace/npmscripts/affected-dep-graph.md b/docs/angular/nx-commands/affected-dep-graph.md similarity index 100% rename from docs/angular/api-workspace/npmscripts/affected-dep-graph.md rename to docs/angular/nx-commands/affected-dep-graph.md diff --git a/docs/angular/api-workspace/npmscripts/affected-e2e.md b/docs/angular/nx-commands/affected-e2e.md similarity index 100% rename from docs/angular/api-workspace/npmscripts/affected-e2e.md rename to docs/angular/nx-commands/affected-e2e.md diff --git a/docs/angular/api-workspace/npmscripts/affected-libs.md b/docs/angular/nx-commands/affected-libs.md similarity index 100% rename from docs/angular/api-workspace/npmscripts/affected-libs.md rename to docs/angular/nx-commands/affected-libs.md diff --git a/docs/angular/api-workspace/npmscripts/affected-lint.md b/docs/angular/nx-commands/affected-lint.md similarity index 100% rename from docs/angular/api-workspace/npmscripts/affected-lint.md rename to docs/angular/nx-commands/affected-lint.md diff --git a/docs/angular/api-workspace/npmscripts/affected-test.md b/docs/angular/nx-commands/affected-test.md similarity index 100% rename from docs/angular/api-workspace/npmscripts/affected-test.md rename to docs/angular/nx-commands/affected-test.md diff --git a/docs/angular/api-workspace/npmscripts/affected.md b/docs/angular/nx-commands/affected.md similarity index 100% rename from docs/angular/api-workspace/npmscripts/affected.md rename to docs/angular/nx-commands/affected.md diff --git a/docs/angular/api-workspace/npmscripts/dep-graph.md b/docs/angular/nx-commands/dep-graph.md similarity index 100% rename from docs/angular/api-workspace/npmscripts/dep-graph.md rename to docs/angular/nx-commands/dep-graph.md diff --git a/docs/angular/api-workspace/npmscripts/format-check.md b/docs/angular/nx-commands/format-check.md similarity index 100% rename from docs/angular/api-workspace/npmscripts/format-check.md rename to docs/angular/nx-commands/format-check.md diff --git a/docs/angular/api-workspace/npmscripts/format-write.md b/docs/angular/nx-commands/format-write.md similarity index 100% rename from docs/angular/api-workspace/npmscripts/format-write.md rename to docs/angular/nx-commands/format-write.md diff --git a/docs/react/api-workspace/npmscripts/list-plugin.md b/docs/angular/nx-commands/list.md similarity index 52% rename from docs/react/api-workspace/npmscripts/list-plugin.md rename to docs/angular/nx-commands/list.md index 8faaeb921d..67a234d89e 100644 --- a/docs/react/api-workspace/npmscripts/list-plugin.md +++ b/docs/angular/nx-commands/list.md @@ -1,28 +1,14 @@ -# list [plugin] +# list Lists installed plugins, capabilities of installed plugins and other available plugins. ## Usage -```bash -nx list [plugin] -``` - -Install `@nrwl/cli` globally to invoke the command directly using `nx`, or use `npm run nx` or `yarn nx`. - -### Examples - -List the plugins installed in the current workspace: - ```bash nx list ``` -List the schematics and builders available in the `@nrwl/web` plugin if it is installed (If the plugin is not installed `nx` will show advice on how to add it to your workspace): - -```bash -nx list @nrwl/web -``` +Install `@nrwl/cli` globally to invoke the command directly using `nx`, or use `npm run nx` or `yarn nx`. ## Options diff --git a/docs/angular/api-workspace/npmscripts/migrate.md b/docs/angular/nx-commands/migrate.md similarity index 100% rename from docs/angular/api-workspace/npmscripts/migrate.md rename to docs/angular/nx-commands/migrate.md diff --git a/docs/angular/api-workspace/npmscripts/print-affected.md b/docs/angular/nx-commands/print-affected.md similarity index 100% rename from docs/angular/api-workspace/npmscripts/print-affected.md rename to docs/angular/nx-commands/print-affected.md diff --git a/docs/angular/api-workspace/npmscripts/report.md b/docs/angular/nx-commands/report.md similarity index 100% rename from docs/angular/api-workspace/npmscripts/report.md rename to docs/angular/nx-commands/report.md diff --git a/docs/react/api-workspace/npmscripts/workspace-lint-files.md b/docs/angular/nx-commands/workspace-lint.md similarity index 80% rename from docs/react/api-workspace/npmscripts/workspace-lint-files.md rename to docs/angular/nx-commands/workspace-lint.md index ddbeb4e34f..8fd75cdbd5 100644 --- a/docs/react/api-workspace/npmscripts/workspace-lint-files.md +++ b/docs/angular/nx-commands/workspace-lint.md @@ -1,11 +1,11 @@ -# workspace-lint [files..] +# workspace-lint Lint workspace or list of files ## Usage ```bash -nx workspace-lint [files..] +nx workspace-lint ``` Install `@nrwl/cli` globally to invoke the command directly using `nx`, or use `npm run nx` or `yarn nx`. diff --git a/docs/web/api-workspace/npmscripts/workspace-schematic-name.md b/docs/angular/nx-commands/workspace-schematic.md similarity index 85% rename from docs/web/api-workspace/npmscripts/workspace-schematic-name.md rename to docs/angular/nx-commands/workspace-schematic.md index 204b3a2167..52b2e34f03 100644 --- a/docs/web/api-workspace/npmscripts/workspace-schematic-name.md +++ b/docs/angular/nx-commands/workspace-schematic.md @@ -1,11 +1,11 @@ -# workspace-schematic [name] +# workspace-schematic Runs a workspace schematic from the tools/schematics directory ## Usage ```bash -nx workspace-schematic [name] +nx workspace-schematic ``` Install `@nrwl/cli` globally to invoke the command directly using `nx`, or use `npm run nx` or `yarn nx`. diff --git a/docs/react/api-workspace/npmscripts/affected-apps.md b/docs/react/nx-commands/affected-apps.md similarity index 100% rename from docs/react/api-workspace/npmscripts/affected-apps.md rename to docs/react/nx-commands/affected-apps.md diff --git a/docs/react/api-workspace/npmscripts/affected-build.md b/docs/react/nx-commands/affected-build.md similarity index 100% rename from docs/react/api-workspace/npmscripts/affected-build.md rename to docs/react/nx-commands/affected-build.md diff --git a/docs/react/api-workspace/npmscripts/affected-dep-graph.md b/docs/react/nx-commands/affected-dep-graph.md similarity index 100% rename from docs/react/api-workspace/npmscripts/affected-dep-graph.md rename to docs/react/nx-commands/affected-dep-graph.md diff --git a/docs/react/api-workspace/npmscripts/affected-e2e.md b/docs/react/nx-commands/affected-e2e.md similarity index 100% rename from docs/react/api-workspace/npmscripts/affected-e2e.md rename to docs/react/nx-commands/affected-e2e.md diff --git a/docs/react/api-workspace/npmscripts/affected-libs.md b/docs/react/nx-commands/affected-libs.md similarity index 100% rename from docs/react/api-workspace/npmscripts/affected-libs.md rename to docs/react/nx-commands/affected-libs.md diff --git a/docs/react/api-workspace/npmscripts/affected-lint.md b/docs/react/nx-commands/affected-lint.md similarity index 100% rename from docs/react/api-workspace/npmscripts/affected-lint.md rename to docs/react/nx-commands/affected-lint.md diff --git a/docs/react/api-workspace/npmscripts/affected-test.md b/docs/react/nx-commands/affected-test.md similarity index 100% rename from docs/react/api-workspace/npmscripts/affected-test.md rename to docs/react/nx-commands/affected-test.md diff --git a/docs/react/api-workspace/npmscripts/affected.md b/docs/react/nx-commands/affected.md similarity index 100% rename from docs/react/api-workspace/npmscripts/affected.md rename to docs/react/nx-commands/affected.md diff --git a/docs/react/api-workspace/npmscripts/dep-graph.md b/docs/react/nx-commands/dep-graph.md similarity index 100% rename from docs/react/api-workspace/npmscripts/dep-graph.md rename to docs/react/nx-commands/dep-graph.md diff --git a/docs/react/api-workspace/npmscripts/format-check.md b/docs/react/nx-commands/format-check.md similarity index 100% rename from docs/react/api-workspace/npmscripts/format-check.md rename to docs/react/nx-commands/format-check.md diff --git a/docs/react/api-workspace/npmscripts/format-write.md b/docs/react/nx-commands/format-write.md similarity index 100% rename from docs/react/api-workspace/npmscripts/format-write.md rename to docs/react/nx-commands/format-write.md diff --git a/docs/react/nx-commands/list.md b/docs/react/nx-commands/list.md new file mode 100644 index 0000000000..67a234d89e --- /dev/null +++ b/docs/react/nx-commands/list.md @@ -0,0 +1,27 @@ +# list + +Lists installed plugins, capabilities of installed plugins and other available plugins. + +## Usage + +```bash +nx list +``` + +Install `@nrwl/cli` globally to invoke the command directly using `nx`, or use `npm run nx` or `yarn nx`. + +## Options + +### help + +Show help + +### plugin + +Default: `null` + +The name of an installed plugin to query + +### version + +Show version number diff --git a/docs/react/api-workspace/npmscripts/migrate.md b/docs/react/nx-commands/migrate.md similarity index 100% rename from docs/react/api-workspace/npmscripts/migrate.md rename to docs/react/nx-commands/migrate.md diff --git a/docs/react/api-workspace/npmscripts/print-affected.md b/docs/react/nx-commands/print-affected.md similarity index 100% rename from docs/react/api-workspace/npmscripts/print-affected.md rename to docs/react/nx-commands/print-affected.md diff --git a/docs/react/api-workspace/npmscripts/report.md b/docs/react/nx-commands/report.md similarity index 100% rename from docs/react/api-workspace/npmscripts/report.md rename to docs/react/nx-commands/report.md diff --git a/docs/angular/api-workspace/npmscripts/workspace-lint-files.md b/docs/react/nx-commands/workspace-lint.md similarity index 80% rename from docs/angular/api-workspace/npmscripts/workspace-lint-files.md rename to docs/react/nx-commands/workspace-lint.md index ddbeb4e34f..8fd75cdbd5 100644 --- a/docs/angular/api-workspace/npmscripts/workspace-lint-files.md +++ b/docs/react/nx-commands/workspace-lint.md @@ -1,11 +1,11 @@ -# workspace-lint [files..] +# workspace-lint Lint workspace or list of files ## Usage ```bash -nx workspace-lint [files..] +nx workspace-lint ``` Install `@nrwl/cli` globally to invoke the command directly using `nx`, or use `npm run nx` or `yarn nx`. diff --git a/docs/angular/api-workspace/npmscripts/workspace-schematic-name.md b/docs/react/nx-commands/workspace-schematic.md similarity index 85% rename from docs/angular/api-workspace/npmscripts/workspace-schematic-name.md rename to docs/react/nx-commands/workspace-schematic.md index 204b3a2167..52b2e34f03 100644 --- a/docs/angular/api-workspace/npmscripts/workspace-schematic-name.md +++ b/docs/react/nx-commands/workspace-schematic.md @@ -1,11 +1,11 @@ -# workspace-schematic [name] +# workspace-schematic Runs a workspace schematic from the tools/schematics directory ## Usage ```bash -nx workspace-schematic [name] +nx workspace-schematic ``` Install `@nrwl/cli` globally to invoke the command directly using `nx`, or use `npm run nx` or `yarn nx`. diff --git a/docs/web/api-workspace/npmscripts/list-plugin.md b/docs/web/api-workspace/npmscripts/list-plugin.md deleted file mode 100644 index 8faaeb921d..0000000000 --- a/docs/web/api-workspace/npmscripts/list-plugin.md +++ /dev/null @@ -1,41 +0,0 @@ -# list [plugin] - -Lists installed plugins, capabilities of installed plugins and other available plugins. - -## Usage - -```bash -nx list [plugin] -``` - -Install `@nrwl/cli` globally to invoke the command directly using `nx`, or use `npm run nx` or `yarn nx`. - -### Examples - -List the plugins installed in the current workspace: - -```bash -nx list -``` - -List the schematics and builders available in the `@nrwl/web` plugin if it is installed (If the plugin is not installed `nx` will show advice on how to add it to your workspace): - -```bash -nx list @nrwl/web -``` - -## Options - -### help - -Show help - -### plugin - -Default: `null` - -The name of an installed plugin to query - -### version - -Show version number diff --git a/docs/web/api-workspace/npmscripts/affected-apps.md b/docs/web/nx-commands/affected-apps.md similarity index 100% rename from docs/web/api-workspace/npmscripts/affected-apps.md rename to docs/web/nx-commands/affected-apps.md diff --git a/docs/web/api-workspace/npmscripts/affected-build.md b/docs/web/nx-commands/affected-build.md similarity index 100% rename from docs/web/api-workspace/npmscripts/affected-build.md rename to docs/web/nx-commands/affected-build.md diff --git a/docs/web/api-workspace/npmscripts/affected-dep-graph.md b/docs/web/nx-commands/affected-dep-graph.md similarity index 100% rename from docs/web/api-workspace/npmscripts/affected-dep-graph.md rename to docs/web/nx-commands/affected-dep-graph.md diff --git a/docs/web/api-workspace/npmscripts/affected-e2e.md b/docs/web/nx-commands/affected-e2e.md similarity index 100% rename from docs/web/api-workspace/npmscripts/affected-e2e.md rename to docs/web/nx-commands/affected-e2e.md diff --git a/docs/web/api-workspace/npmscripts/affected-libs.md b/docs/web/nx-commands/affected-libs.md similarity index 100% rename from docs/web/api-workspace/npmscripts/affected-libs.md rename to docs/web/nx-commands/affected-libs.md diff --git a/docs/web/api-workspace/npmscripts/affected-lint.md b/docs/web/nx-commands/affected-lint.md similarity index 100% rename from docs/web/api-workspace/npmscripts/affected-lint.md rename to docs/web/nx-commands/affected-lint.md diff --git a/docs/web/api-workspace/npmscripts/affected-test.md b/docs/web/nx-commands/affected-test.md similarity index 100% rename from docs/web/api-workspace/npmscripts/affected-test.md rename to docs/web/nx-commands/affected-test.md diff --git a/docs/web/api-workspace/npmscripts/affected.md b/docs/web/nx-commands/affected.md similarity index 100% rename from docs/web/api-workspace/npmscripts/affected.md rename to docs/web/nx-commands/affected.md diff --git a/docs/web/api-workspace/npmscripts/dep-graph.md b/docs/web/nx-commands/dep-graph.md similarity index 100% rename from docs/web/api-workspace/npmscripts/dep-graph.md rename to docs/web/nx-commands/dep-graph.md diff --git a/docs/web/api-workspace/npmscripts/format-check.md b/docs/web/nx-commands/format-check.md similarity index 100% rename from docs/web/api-workspace/npmscripts/format-check.md rename to docs/web/nx-commands/format-check.md diff --git a/docs/web/api-workspace/npmscripts/format-write.md b/docs/web/nx-commands/format-write.md similarity index 100% rename from docs/web/api-workspace/npmscripts/format-write.md rename to docs/web/nx-commands/format-write.md diff --git a/docs/web/nx-commands/list.md b/docs/web/nx-commands/list.md new file mode 100644 index 0000000000..67a234d89e --- /dev/null +++ b/docs/web/nx-commands/list.md @@ -0,0 +1,27 @@ +# list + +Lists installed plugins, capabilities of installed plugins and other available plugins. + +## Usage + +```bash +nx list +``` + +Install `@nrwl/cli` globally to invoke the command directly using `nx`, or use `npm run nx` or `yarn nx`. + +## Options + +### help + +Show help + +### plugin + +Default: `null` + +The name of an installed plugin to query + +### version + +Show version number diff --git a/docs/web/api-workspace/npmscripts/migrate.md b/docs/web/nx-commands/migrate.md similarity index 100% rename from docs/web/api-workspace/npmscripts/migrate.md rename to docs/web/nx-commands/migrate.md diff --git a/docs/web/api-workspace/npmscripts/print-affected.md b/docs/web/nx-commands/print-affected.md similarity index 100% rename from docs/web/api-workspace/npmscripts/print-affected.md rename to docs/web/nx-commands/print-affected.md diff --git a/docs/web/api-workspace/npmscripts/report.md b/docs/web/nx-commands/report.md similarity index 100% rename from docs/web/api-workspace/npmscripts/report.md rename to docs/web/nx-commands/report.md diff --git a/docs/web/api-workspace/npmscripts/workspace-lint-files.md b/docs/web/nx-commands/workspace-lint.md similarity index 80% rename from docs/web/api-workspace/npmscripts/workspace-lint-files.md rename to docs/web/nx-commands/workspace-lint.md index ddbeb4e34f..8fd75cdbd5 100644 --- a/docs/web/api-workspace/npmscripts/workspace-lint-files.md +++ b/docs/web/nx-commands/workspace-lint.md @@ -1,11 +1,11 @@ -# workspace-lint [files..] +# workspace-lint Lint workspace or list of files ## Usage ```bash -nx workspace-lint [files..] +nx workspace-lint ``` Install `@nrwl/cli` globally to invoke the command directly using `nx`, or use `npm run nx` or `yarn nx`. diff --git a/docs/react/api-workspace/npmscripts/workspace-schematic-name.md b/docs/web/nx-commands/workspace-schematic.md similarity index 85% rename from docs/react/api-workspace/npmscripts/workspace-schematic-name.md rename to docs/web/nx-commands/workspace-schematic.md index 204b3a2167..52b2e34f03 100644 --- a/docs/react/api-workspace/npmscripts/workspace-schematic-name.md +++ b/docs/web/nx-commands/workspace-schematic.md @@ -1,11 +1,11 @@ -# workspace-schematic [name] +# workspace-schematic Runs a workspace schematic from the tools/schematics directory ## Usage ```bash -nx workspace-schematic [name] +nx workspace-schematic ``` Install `@nrwl/cli` globally to invoke the command directly using `nx`, or use `npm run nx` or `yarn nx`. diff --git a/scripts/documentation/documentation.sh b/scripts/documentation/documentation.sh index 5a54d2ce69..3034ba8ceb 100755 --- a/scripts/documentation/documentation.sh +++ b/scripts/documentation/documentation.sh @@ -5,5 +5,5 @@ set -e echo "Generating API documentation" ts-node ./scripts/documentation/generate-builders-data.ts ts-node ./scripts/documentation/generate-schematics-data.ts -ts-node ./scripts/documentation/generate-npmscripts-data.ts +ts-node ./scripts/documentation/generate-nx-commands-data.ts echo 'Done generating all Documentation' diff --git a/scripts/documentation/generate-npmscripts-data.ts b/scripts/documentation/generate-nx-commands-data.ts similarity index 95% rename from scripts/documentation/generate-npmscripts-data.ts rename to scripts/documentation/generate-nx-commands-data.ts index b2fa1ba405..e14d5aef00 100644 --- a/scripts/documentation/generate-npmscripts-data.ts +++ b/scripts/documentation/generate-nx-commands-data.ts @@ -358,14 +358,14 @@ const examples = { } ] }; -console.log('Generating npmscript Documentation'); +console.log('Generating Nx Commands Documentation'); Promise.all( ['web', 'angular', 'react'].map(async framework => { const commandsOutputDirectory = path.join( __dirname, '../../docs/', framework, - 'api-workspace/npmscripts' + 'nx-commands' ); fs.removeSync(commandsOutputDirectory); function getCommands(command) { @@ -376,15 +376,15 @@ Promise.all( const builderDescriptions = builder.getUsageInstance().getDescriptions(); const builderDefaultOptions = builder.getOptions().default; return { - command: command['original'], + command: name, description: command['description'], options: - Object.keys(builderDescriptions).map(name => ({ - command: '--'.concat(name), - description: builderDescriptions[name] - ? builderDescriptions[name].replace('__yargsString__:', '') + Object.keys(builderDescriptions).map(key => ({ + command: '--'.concat(key), + description: builderDescriptions[key] + ? builderDescriptions[key].replace('__yargsString__:', '') : '', - default: builderDefaultOptions[name] + default: builderDefaultOptions[key] })) || null }; } @@ -446,12 +446,11 @@ Promise.all( } // TODO: Try to add option's type, examples, and group? - // TODO: split one command per page / Create an index - const npmscripts = getCommands(commandsObject); + const nxCommands = getCommands(commandsObject); await Promise.all( - Object.keys(npmscripts) + Object.keys(nxCommands) .filter(name => !name.startsWith('run') && !name.startsWith('generate')) - .map(name => parseCommandInstance(name, npmscripts[name])) + .map(name => parseCommandInstance(name, nxCommands[name])) .map(command => generateMarkdown(command)) .map(templateObject => generateMarkdownFile(commandsOutputDirectory, templateObject) @@ -459,5 +458,5 @@ Promise.all( ); }) ).then(() => { - console.log('Finished generating npmscripts Documentation'); + console.log('Finished generating Nx Commands Documentation'); });