Skip to content

Commit

Permalink
docs(misc): udpate path option description and provide examples
Browse files Browse the repository at this point in the history
  • Loading branch information
leosvelperez committed Nov 27, 2024
1 parent 9e48c1d commit 0122138
Show file tree
Hide file tree
Showing 77 changed files with 469 additions and 170 deletions.
4 changes: 2 additions & 2 deletions docs/generated/packages/angular/generators/component.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"properties": {
"path": {
"type": "string",
"description": "The file path to the component without the file extension and suffix (e.g. `my-app/src/app/my-component/my-component` generates the file `my-app/src/app/my-component/my-component.component.ts`). Relative to the current working directory.",
"description": "The file path to the component without the file extension and suffix. Relative to the current working directory.",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What is the component file path?"
},
Expand Down Expand Up @@ -112,7 +112,7 @@
}
},
"required": ["path"],
"examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Simple Component\" %}\n\nCreate a component named `my-component`:\n\n```bash\nnx g @nx/angular:component apps/my-app/src/lib/my-component/my-component\n```\n\n{% /tab %}\n\n{% tab label=\"Single File Component\" %}\n\nCreate a component named `my-component` with inline styles and inline template:\n\n```bash\nnx g @nx/angular:component apps/my-app/src/lib/my-component/my-component --inlineStyle --inlineTemplate\n```\n\n{% /tab %}\n\n{% tab label=\"Component with OnPush Change Detection Strategy\" %}\n\nCreate a component named `my-component` with OnPush Change Detection Strategy:\n\n```bash\nnx g @nx/angular:component apps/my-app/src/lib/my-component/my-component --changeDetection=OnPush\n```\n\n{% /tab %}\n",
"examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Simple Component\" %}\n\nGenerate a component named `MyComponent` at `apps/my-app/src/lib/my-component/my-component.component.ts`:\n\n```bash\nnx g @nx/angular:component apps/my-app/src/lib/my-component/my-component\n```\n\n{% /tab %}\n\n{% tab label=\"With Different Symbol Name\" %}\n\nGenerate a component named `CustomComponent` at `apps/my-app/src/lib/my-component/my-component.component.ts`:\n\n```bash\nnx g @nx/angular:component apps/my-app/src/lib/my-component/my-component --name=custom\n```\n\n{% /tab %}\n\n{% tab label=\"Single File Component\" %}\n\nCreate a component named `my-component` with inline styles and inline template:\n\n```bash\nnx g @nx/angular:component apps/my-app/src/lib/my-component/my-component --inlineStyle --inlineTemplate\n```\n\n{% /tab %}\n\n{% tab label=\"Component with OnPush Change Detection Strategy\" %}\n\nCreate a component named `my-component` with OnPush Change Detection Strategy:\n\n```bash\nnx g @nx/angular:component apps/my-app/src/lib/my-component/my-component --changeDetection=OnPush\n```\n\n{% /tab %}\n",
"presets": []
},
"aliases": ["c"],
Expand Down
12 changes: 11 additions & 1 deletion docs/generated/packages/angular/generators/directive.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,20 @@
"type": "object",
"description": "Creates a new Angular directive.",
"additionalProperties": false,
"examples": [
{
"description": "Generate a directive with the exported symbol matching the file name. It results in the directive `FooDirective` at `mylib/src/lib/foo.directive.ts`",
"command": "nx g @nx/angular:directive mylib/src/lib/foo"
},
{
"description": "Generate a directive with the exported symbol different from the file name. It results in the directive `CustomDirective` at `mylib/src/lib/foo.directive.ts`",
"command": "nx g @nx/angular:directive mylib/src/lib/foo --name=custom"
}
],
"properties": {
"path": {
"type": "string",
"description": "The file path to the directive without the file extension and suffix (e.g. `my-app/src/app/my-directive/my-directive` generates the file `my-app/src/app/my-directive/my-directive.directive.ts`). Relative to the current working directory.",
"description": "The file path to the directive without the file extension and suffix. Relative to the current working directory.",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What is the directive file path?"
},
Expand Down
12 changes: 11 additions & 1 deletion docs/generated/packages/angular/generators/pipe.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,20 @@
"cli": "nx",
"additionalProperties": false,
"description": "Creates an Angular pipe.",
"examples": [
{
"description": "Generate a pipe with the exported symbol matching the file name. It results in the pipe `FooPipe` at `mylib/src/lib/foo.pipe.ts`",
"command": "nx g @nx/angular:pipe mylib/src/lib/foo"
},
{
"description": "Generate a pipe with the exported symbol different from the file name. It results in the pipe `CustomPipe` at `mylib/src/lib/foo.pipe.ts`",
"command": "nx g @nx/angular:pipe mylib/src/lib/foo --name=custom"
}
],
"properties": {
"path": {
"type": "string",
"description": "The file path to the pipe without the file extension and suffix (e.g. `my-app/src/app/my-pipe/my-pipe` generates the file `my-app/src/app/my-pipe/my-pipe.pipe.ts`). Relative to the current working directory.",
"description": "The file path to the pipe without the file extension and suffix. Relative to the current working directory.",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What is the pipe file path?"
},
Expand Down
10 changes: 7 additions & 3 deletions docs/generated/packages/angular/generators/scam-directive.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,20 @@
"type": "object",
"examples": [
{
"command": "nx g @nx/angular:scam-directive my-lib/src/lib/my-sample/my-sample",
"description": "Generate a `MySampleDirective` directive in a `my-sample` folder in the `my-lib` library"
"description": "Generate a directive with the exported symbol matching the file name. It results in the directive `FooDirective` at `mylib/src/lib/foo.directive.ts`",
"command": "nx g @nx/angular:scam-directive mylib/src/lib/foo"
},
{
"description": "Generate a directive with the exported symbol different from the file name. It results in the directive `CustomDirective` at `mylib/src/lib/foo.directive.ts`",
"command": "nx g @nx/angular:scam-directive mylib/src/lib/foo --name=custom"
}
],
"description": "Creates a new, generic Angular directive definition in the given or default project.",
"additionalProperties": false,
"properties": {
"path": {
"type": "string",
"description": "The file path to the SCAM directive without the file extension and suffix (e.g. `my-app/src/app/my-scam/my-scam` generates the file `my-app/src/app/my-scam/my-scam.directive.ts`). Relative to the current working directory.",
"description": "The file path to the SCAM directive without the file extension and suffix. Relative to the current working directory.",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What is the SCAM directive file path?"
},
Expand Down
10 changes: 7 additions & 3 deletions docs/generated/packages/angular/generators/scam-pipe.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,20 @@
"type": "object",
"examples": [
{
"command": "nx g @nx/angular:scam-pipe mylib/src/lib/my-transformation/my-transformation",
"description": "Generates a `MyTransformationPipe` in a `my-transformation` folder in the `my-lib` project"
"description": "Generate a pipe with the exported symbol matching the file name. It results in the pipe `FooPipe` at `mylib/src/lib/foo.pipe.ts`",
"command": "nx g @nx/angular:scam-pipe mylib/src/lib/foo"
},
{
"description": "Generate a pipe with the exported symbol different from the file name. It results in the pipe `CustomPipe` at `mylib/src/lib/foo.pipe.ts`",
"command": "nx g @nx/angular:scam-pipe mylib/src/lib/foo --name=custom"
}
],
"description": "Creates a new, generic Angular pipe definition in the given or default project.",
"additionalProperties": false,
"properties": {
"path": {
"type": "string",
"description": "The file path to the SCAM pipe without the file extension and suffix (e.g. `my-app/src/app/my-scam/my-scam` generates the file `my-app/src/app/my-scam/my-scam.pipe.ts`). Relative to the current working directory.",
"description": "The file path to the SCAM pipe without the file extension and suffix. Relative to the current working directory.",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What is the SCAM pipe file path?"
},
Expand Down
10 changes: 7 additions & 3 deletions docs/generated/packages/angular/generators/scam.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,20 @@
"type": "object",
"examples": [
{
"command": "nx g @nx/angular:scam my-lib/src/lib/my-sample/my-sample",
"description": "Generate a `MySampleComponent` component in the `my-lib` library."
"description": "Generate a component with the exported symbol matching the file name. It results in the component `FooComponent` at `mylib/src/lib/foo.component.ts`",
"command": "nx g @nx/angular:scam mylib/src/lib/foo"
},
{
"description": "Generate a component with the exported symbol different from the file name. It results in the component `CustomComponent` at `mylib/src/lib/foo.component.ts`",
"command": "nx g @nx/angular:scam mylib/src/lib/foo --name=custom"
}
],
"description": "Creates a new Angular SCAM.",
"additionalProperties": false,
"properties": {
"path": {
"type": "string",
"description": "The file path to the SCAM without the file extension and suffix (e.g. `my-app/src/app/my-scam/my-scam` generates the file `my-app/src/app/my-scam/my-scam.component.ts`). Relative to the current working directory.",
"description": "The file path to the SCAM without the file extension and suffix. Relative to the current working directory.",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What is the SCAM file path?"
},
Expand Down
4 changes: 2 additions & 2 deletions docs/generated/packages/expo/generators/application.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
"description": "Create an Expo Application for Nx.",
"examples": [
{
"command": "g @nx/expo:app myapp --directory=nested",
"command": "nx g @nx/expo:app myapp --directory=nested",
"description": "Generate apps/nested/myapp"
},
{
"command": "g @nx/expo:app myapp --classComponent",
"command": "nx g @nx/expo:app myapp --classComponent",
"description": "Use class components instead of functional components"
}
],
Expand Down
14 changes: 9 additions & 5 deletions docs/generated/packages/expo/generators/component.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,22 @@
"type": "object",
"examples": [
{
"command": "g @nx/expo:component mylib/my-component",
"description": "Generate a component in the mylib library"
"description": "Generate a component with the exported symbol matching the file name. It results in the component `Foo` at `mylib/src/foo.tsx`",
"command": "nx g @nx/expo:component mylib/src/foo"
},
{
"command": "g @nx/expo:component mylib/my-component --classComponent",
"description": "Generate a class component in the mylib library"
"description": "Generate a component with the exported symbol different from the file name. It results in the component `Custom` at `mylib/src/foo.tsx`",
"command": "nx g @nx/expo:component mylib/src/foo --name=custom"
},
{
"description": "Generate a class component at `mylib/src/foo.tsx`",
"command": "nx g @nx/expo:component mylib/src/foo --classComponent"
}
],
"properties": {
"path": {
"type": "string",
"description": "The file path to the component without the file extension (e.g. `my-app/src/app/my-component/my-component` generates the file `my-app/src/app/my-component/my-component.tsx`). Relative to the current working directory.",
"description": "The file path to the component without the file extension. Relative to the current working directory.",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What is the component file path?"
},
Expand Down
2 changes: 1 addition & 1 deletion docs/generated/packages/expo/generators/library.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"type": "object",
"examples": [
{
"command": "g @nx/expo:lib mylib --directory=myapp",
"command": "nx g @nx/expo:lib mylib --directory=myapp",
"description": "Generate libs/myapp/mylib"
}
],
Expand Down
8 changes: 7 additions & 1 deletion docs/generated/packages/nest/generators/class.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@
"description": "Nest Class Options Schema.",
"cli": "nx",
"type": "object",
"examples": [
{
"description": "Generate the class `Foo` at `myapp/src/app/foo.ts`",
"command": "nx g @nx/nest:class myapp/src/app/foo"
}
],
"properties": {
"path": {
"description": "The file path to the class without the file extension (e.g. `my-app/src/app/my-class/my-class` generates the file `my-app/src/app/my-class/my-class.ts`). Relative to the current working directory.",
"description": "The file path to the class without the file extension. Relative to the current working directory.",
"type": "string",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What is the class file path?"
Expand Down
8 changes: 7 additions & 1 deletion docs/generated/packages/nest/generators/controller.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@
"description": "Nest Controller Options Schema.",
"cli": "nx",
"type": "object",
"examples": [
{
"description": "Generate the controller `FooController` at `myapp/src/app/foo.controller.ts`",
"command": "nx g @nx/nest:controller myapp/src/app/foo"
}
],
"properties": {
"path": {
"description": "The file path to the controller without the file extension and suffix (e.g. `my-app/src/app/my-controller/my-controller` generates the file `my-app/src/app/my-controller/my-controller.controller.ts`). Relative to the current working directory.",
"description": "The file path to the controller without the file extension and suffix. Relative to the current working directory.",
"type": "string",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What is the controller file path?"
Expand Down
8 changes: 7 additions & 1 deletion docs/generated/packages/nest/generators/decorator.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@
"description": "Nest Decorator Options Schema.",
"cli": "nx",
"type": "object",
"examples": [
{
"description": "Generate the decorator `Foo` at `myapp/src/app/foo.decorator.ts`",
"command": "nx g @nx/nest:decorator myapp/src/app/foo"
}
],
"properties": {
"path": {
"description": "The file path to the decorator without the file extension and suffix (e.g. `my-app/src/app/my-decorator/my-decorator` generates the file `my-app/src/app/my-decorator/my-decorator.decorator.ts`). Relative to the current working directory.",
"description": "The file path to the decorator without the file extension and suffix. Relative to the current working directory.",
"type": "string",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What is the decorator file path?"
Expand Down
8 changes: 7 additions & 1 deletion docs/generated/packages/nest/generators/filter.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@
"description": "Nest Filter Options Schema.",
"cli": "nx",
"type": "object",
"examples": [
{
"description": "Generate the filter `FooFilter` at `myapp/src/app/foo.filter.ts`",
"command": "nx g @nx/nest:filter myapp/src/app/foo"
}
],
"properties": {
"path": {
"description": "The file path to the filter without the file extension and suffix (e.g. `my-app/src/app/my-filter/my-filter` generates the file `my-app/src/app/my-filter/my-filter.filter.ts`). Relative to the current working directory.",
"description": "The file path to the filter without the file extension and suffix. Relative to the current working directory.",
"type": "string",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What is the filter file path?"
Expand Down
8 changes: 7 additions & 1 deletion docs/generated/packages/nest/generators/gateway.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@
"description": "Nest Gateway Options Schema.",
"cli": "nx",
"type": "object",
"examples": [
{
"description": "Generate the gateway `FooGateway` at `myapp/src/app/foo.gateway.ts`",
"command": "nx g @nx/nest:gateway myapp/src/app/foo"
}
],
"properties": {
"path": {
"description": "The file path to the gateway without the file extension and suffix (e.g. `my-app/src/app/my-gateway/my-gateway` generates the file `my-app/src/app/my-gateway/my-gateway.gateway.ts`). Relative to the current working directory.",
"description": "The file path to the gateway without the file extension and suffix. Relative to the current working directory.",
"type": "string",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What is the gateway file path?"
Expand Down
8 changes: 7 additions & 1 deletion docs/generated/packages/nest/generators/guard.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@
"description": "Nest Guard Options Schema.",
"cli": "nx",
"type": "object",
"examples": [
{
"description": "Generate the guard `FooGuard` at `myapp/src/app/foo.guard.ts`",
"command": "nx g @nx/nest:guard myapp/src/app/foo"
}
],
"properties": {
"path": {
"description": "The file path to the guard without the file extension and suffix (e.g. `my-app/src/app/my-guard/my-guard` generates the file `my-app/src/app/my-guard/my-guard.guard.ts`). Relative to the current working directory.",
"description": "The file path to the guard without the file extension and suffix. Relative to the current working directory.",
"type": "string",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What is the guard file path?"
Expand Down
8 changes: 7 additions & 1 deletion docs/generated/packages/nest/generators/interceptor.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@
"description": "Nest Interceptor Options Schema.",
"cli": "nx",
"type": "object",
"examples": [
{
"description": "Generate the interceptor `FooInterceptor` at `myapp/src/app/foo.interceptor.ts`",
"command": "nx g @nx/nest:interceptor myapp/src/app/foo"
}
],
"properties": {
"path": {
"description": "The file path to the interceptor without the file extension and suffix (e.g. `my-app/src/app/my-interceptor/my-interceptor` generates the file `my-app/src/app/my-interceptor/my-interceptor.interceptor.ts`). Relative to the current working directory.",
"description": "The file path to the interceptor without the file extension and suffix. Relative to the current working directory.",
"type": "string",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What is the interceptor file path?"
Expand Down
8 changes: 7 additions & 1 deletion docs/generated/packages/nest/generators/interface.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@
"description": "Nest Interface Options Schema.",
"cli": "nx",
"type": "object",
"examples": [
{
"description": "Generate the interface `Foo` at `myapp/src/app/foo.interface.ts`",
"command": "nx g @nx/nest:interface myapp/src/app/foo"
}
],
"properties": {
"path": {
"description": "The file path to the interface without the file extension and suffix (e.g. `my-app/src/app/my-interface/my-interface` generates the file `my-app/src/app/my-interface/my-interface.interface.ts`). Relative to the current working directory.",
"description": "The file path to the interface without the file extension and suffix. Relative to the current working directory.",
"type": "string",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What is the interface file path?"
Expand Down
8 changes: 7 additions & 1 deletion docs/generated/packages/nest/generators/middleware.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@
"description": "Nest Middleware Options Schema.",
"cli": "nx",
"type": "object",
"examples": [
{
"description": "Generate the middleware `FooMiddleware` at `myapp/src/app/foo.middleware.ts`",
"command": "nx g @nx/nest:middleware myapp/src/app/foo"
}
],
"properties": {
"path": {
"description": "The file path to the middleware without the file extension and suffix (e.g. `my-app/src/app/my-middleware/my-middleware` generates the file `my-app/src/app/my-middleware/my-middleware.middleware.ts`). Relative to the current working directory.",
"description": "The file path to the middleware without the file extension and suffix. Relative to the current working directory.",
"type": "string",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What is the middleware file path?"
Expand Down
Loading

0 comments on commit 0122138

Please sign in to comment.