From adf87988d4eba09be20526be5be89405c4afb225 Mon Sep 17 00:00:00 2001 From: Jack Hsu Date: Tue, 22 Feb 2022 15:52:29 -0500 Subject: [PATCH] chore(node): update docs after consolidating js and node plugins --- .../api-js/generators/application.md | 166 ------------------ docs/generated/api-node/executors/execute.md | 68 ------- .../{api-js => api-node}/executors/node.md | 8 +- docs/generated/api-node/executors/package.md | 102 ----------- .../executors/{build.md => webpack.md} | 8 +- docs/map.json | 27 +-- packages/node/executors.json | 2 +- 7 files changed, 15 insertions(+), 366 deletions(-) delete mode 100644 docs/generated/api-js/generators/application.md delete mode 100644 docs/generated/api-node/executors/execute.md rename docs/generated/{api-js => api-node}/executors/node.md (88%) delete mode 100644 docs/generated/api-node/executors/package.md rename docs/generated/api-node/executors/{build.md => webpack.md} (94%) diff --git a/docs/generated/api-js/generators/application.md b/docs/generated/api-js/generators/application.md deleted file mode 100644 index a86645904ba58b..00000000000000 --- a/docs/generated/api-js/generators/application.md +++ /dev/null @@ -1,166 +0,0 @@ ---- -title: '@nrwl/js:application generator' -description: 'Create a application' ---- - -# @nrwl/js:application - -Create a application - -## Usage - -```bash -nx generate application ... -``` - -```bash -nx g app ... # same -``` - -By default, Nx will search for `application` in the default collection provisioned in `workspace.json`. - -You can specify the collection explicitly as follows: - -```bash -nx g @nrwl/js:application ... -``` - -Show what will be generated without writing to disk: - -```bash -nx g application ... --dry-run -``` - -### Examples - -Generate libs/myapp/mylib: - -```bash -nx g lib mylib --directory=myapp -``` - -## Options - -### name (_**required**_) - -Type: `string` - -Library name - -### compiler - -Default: `tsc` - -Type: `string` - -Possible values: `tsc`, `swc` - -The compiler used by the build and test targets - -### config - -Default: `project` - -Type: `string` - -Possible values: `workspace`, `project`, `npm-scripts` - -Determines whether the project's executors should be configured in workspace.json, project.json or as npm scripts - -### directory - -Type: `string` - -A directory where the lib is placed - -### importPath - -Type: `string` - -The library name used to import it, like @myorg/my-awesome-lib - -### js - -Default: `false` - -Type: `boolean` - -Generate JavaScript files rather than TypeScript files - -### linter - -Default: `eslint` - -Type: `string` - -Possible values: `eslint`, `none` - -The tool to use for running lint checks. - -### pascalCaseFiles - -Alias(es): P - -Default: `false` - -Type: `boolean` - -Use pascal case file names. - -### setParserOptionsProject - -Default: `false` - -Type: `boolean` - -Whether or not to configure the ESLint "parserOptions.project" option. We do not do this by default for lint performance reasons. - -### skipFormat - -Default: `false` - -Type: `boolean` - -Skip formatting files - -### skipTsConfig - -Default: `false` - -Type: `boolean` - -Do not update tsconfig.json for development experience. - -### strict - -Default: `true` - -Type: `boolean` - -Whether to enable tsconfig strict mode or not. - -### tags - -Type: `string` - -Add tags to the library (used for linting) - -### testEnvironment - -Default: `jsdom` - -Type: `string` - -Possible values: `jsdom`, `node` - -The test environment to use if unitTestRunner is set to jest - -### unitTestRunner - -Default: `jest` - -Type: `string` - -Possible values: `jest`, `none` - -Test runner to use for unit tests diff --git a/docs/generated/api-node/executors/execute.md b/docs/generated/api-node/executors/execute.md deleted file mode 100644 index b90e8bedd7aa2f..00000000000000 --- a/docs/generated/api-node/executors/execute.md +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: '@nrwl/node:execute executor' -description: 'Execute a Node application' ---- - -# @nrwl/node:execute - -Execute a Node application - -Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/configuration/projectjson#targets. - -## Options - -### buildTarget (_**required**_) - -Type: `string` - -The target to run to build you the app - -### args - -Type: `array` - -Extra args when starting the app - -### host - -Default: `localhost` - -Type: `string` - -The host to inspect the process on - -### inspect - -Default: `inspect` - -Type: `string | boolean ` - -Ensures the app is starting with debugging - -### port - -Default: `9229` - -Type: `number` - -The port to inspect the process on. Setting port to 0 will assign random free ports to all forked processes. - -### runtimeArgs - -Type: `array` - -Extra args passed to the node process - -### waitUntilTargets - -Type: `array` - -The targets to run to before starting the node app - -### watch - -Default: `true` - -Type: `boolean` - -Run build when files change diff --git a/docs/generated/api-js/executors/node.md b/docs/generated/api-node/executors/node.md similarity index 88% rename from docs/generated/api-js/executors/node.md rename to docs/generated/api-node/executors/node.md index 3f8d56c1c6411e..a53b2dbed4870e 100644 --- a/docs/generated/api-js/executors/node.md +++ b/docs/generated/api-node/executors/node.md @@ -1,11 +1,11 @@ --- -title: '@nrwl/js:node executor' -description: 'Build Node.js applications' +title: '@nrwl/node:node executor' +description: 'Execute a Node application' --- -# @nrwl/js:node +# @nrwl/node:node -Build Node.js applications +Execute a Node application Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/configuration/projectjson#targets. diff --git a/docs/generated/api-node/executors/package.md b/docs/generated/api-node/executors/package.md deleted file mode 100644 index 8791c8fb39a4fb..00000000000000 --- a/docs/generated/api-node/executors/package.md +++ /dev/null @@ -1,102 +0,0 @@ ---- -title: '@nrwl/node:package executor' -description: 'Package a Node library' ---- - -# @nrwl/node:package - -Package a Node library - -Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/configuration/projectjson#targets. - -## Options - -### main (_**required**_) - -Type: `string` - -The name of the main entry-point file. - -### tsConfig (_**required**_) - -Type: `string` - -The name of the Typescript configuration file. - -### assets - -Type: `array` - -List of static library assets. - -### buildableProjectDepsInPackageJsonType - -Default: `dependencies` - -Type: `string` - -Possible values: `dependencies`, `peerDependencies` - -When updateBuildableProjectDepsInPackageJson is true, this adds dependencies to either `peerDependencies` or `dependencies` - -### cli - -Type: `boolean` - -Adds a CLI wrapper to main entry-point file. - -### deleteOutputPath - -Default: `true` - -Type: `boolean` - -Delete the output path before building. - -### outputPath - -Type: `string` - -The output path of the generated files. - -### packageJson - -Type: `string` - -The name of the package.json file - -### sourceMap - -Default: `true` - -Type: `boolean` - -Output sourcemaps. - -### srcRootForCompilationRoot - -Type: `string` - -Sets the rootDir for TypeScript compilation. When not defined, it uses the project's root property - -### tsPlugins - -Type: `array` - -List of TypeScript Compiler Plugins. - -### updateBuildableProjectDepsInPackageJson - -Default: `true` - -Type: `boolean` - -Update buildable project dependencies in package.json - -### watch - -Default: `false` - -Type: `boolean` - -Enable re-building when files change. diff --git a/docs/generated/api-node/executors/build.md b/docs/generated/api-node/executors/webpack.md similarity index 94% rename from docs/generated/api-node/executors/build.md rename to docs/generated/api-node/executors/webpack.md index e7334603f1bf27..2a5755cfb4a010 100644 --- a/docs/generated/api-node/executors/build.md +++ b/docs/generated/api-node/executors/webpack.md @@ -1,11 +1,11 @@ --- -title: '@nrwl/node:build executor' -description: 'Build a Node application' +title: '@nrwl/node:webpack executor' +description: 'Build a Node application using webpack' --- -# @nrwl/node:build +# @nrwl/node:webpack -Build a Node application +Build a Node application using webpack Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/configuration/projectjson#targets. diff --git a/docs/map.json b/docs/map.json index 6e3cee138623b9..51d6916309220c 100644 --- a/docs/map.json +++ b/docs/map.json @@ -534,11 +534,6 @@ "searchResultsName": "@nrwl/js Overview", "file": "shared/js-plugin" }, - { - "name": "application generator", - "id": "application", - "file": "generated/api-js/generators/application" - }, { "name": "library generator", "id": "library", @@ -549,11 +544,6 @@ "id": "convert-to-swc", "file": "generated/api-js/generators/convert-to-swc" }, - { - "name": "node executor", - "id": "node", - "file": "generated/api-js/executors/node" - }, { "name": "tsc executor", "id": "tsc", @@ -969,19 +959,14 @@ "file": "generated/api-node/generators/library" }, { - "name": "build executor", - "id": "build", - "file": "generated/api-node/executors/build" - }, - { - "name": "execute executor", - "id": "execute", - "file": "generated/api-node/executors/execute" + "name": "webpack executor", + "id": "webpack", + "file": "generated/api-node/executors/webpack" }, { - "name": "package executor", - "id": "package", - "file": "generated/api-node/executors/package" + "name": "node executor", + "id": "node", + "file": "generated/api-node/executors/node" } ] }, diff --git a/packages/node/executors.json b/packages/node/executors.json index f6950ed670226b..6afcad152749b9 100644 --- a/packages/node/executors.json +++ b/packages/node/executors.json @@ -5,7 +5,7 @@ "schema": "./src/executors/webpack/schema.json", "description": "Build a Node application using webpack" }, - "nodet ": { + "node": { "implementation": "./src/executors/node/node.impl", "schema": "./src/executors/node/schema.json", "description": "Execute a Node application"