Skip to content

Commit

Permalink
fix(core): Update angular, react, workspace, plugin, nest, next & remix
Browse files Browse the repository at this point in the history
  • Loading branch information
ndcunningham committed Sep 26, 2024
1 parent b32fdc8 commit e21adb5
Show file tree
Hide file tree
Showing 83 changed files with 353 additions and 476 deletions.
20 changes: 7 additions & 13 deletions docs/generated/packages/angular/generators/component.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,16 @@
"description": "Creates a new Angular component.",
"additionalProperties": false,
"properties": {
"name": {
"path": {
"type": "string",
"description": "The name of the component.",
"description": "The path at which to create the component file, relative to the workspace root. By default, it is set to the root of the project.",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What name would you like to use for the component?"
"x-prompt": "Where to create the component?"
},
"directory": {
"type": "string",
"description": "The directory at which to create the component file. When `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. Otherwise, it will be relative to the workspace root.",
"aliases": ["dir", "path"],
"x-priority": "important"
},
"nameAndDirectoryFormat": {
"description": "Whether to generate the component in the directory as provided, relative to the current working directory and ignoring the project (`as-provided`) or generate it using the project and directory relative to the workspace root (`derived`).",
"name": {
"type": "string",
"enum": ["as-provided", "derived"]
"description": "The name of the component.",
"x-prompt": "What name would you like to use for the component?"
},
"prefix": {
"type": "string",
Expand Down Expand Up @@ -118,7 +112,7 @@
"x-priority": "internal"
}
},
"required": ["name"],
"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 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 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 my-component --changeDetection=OnPush\n```\n\n{% /tab %}\n",
"presets": []
},
Expand Down
20 changes: 7 additions & 13 deletions docs/generated/packages/angular/generators/directive.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,17 @@
"description": "Creates a new Angular directive.",
"additionalProperties": false,
"properties": {
"path": {
"type": "string",
"description": "The path at which to create the directive file.",
"x-prompt": "Where to put the directive?",
"$default": { "$source": "argv", "index": 0 }
},
"name": {
"type": "string",
"description": "The name of the new directive.",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What name would you like to use for the directive?"
},
"directory": {
"type": "string",
"description": "The directory at which to create the directive file. When `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. Otherwise, it will be relative to the workspace root.",
"aliases": ["dir", "path"],
"x-priority": "important"
},
"nameAndDirectoryFormat": {
"description": "Whether to generate the directive in the directory as provided, relative to the current working directory and ignoring the project (`as-provided`) or generate it using the project and directory relative to the workspace root (`derived`).",
"type": "string",
"enum": ["as-provided", "derived"]
},
"prefix": {
"type": "string",
"description": "A prefix to apply to generated selectors.",
Expand Down Expand Up @@ -72,7 +66,7 @@
"description": "Skip formatting of files."
}
},
"required": ["name"],
"required": ["path"],
"presets": []
},
"aliases": ["d"],
Expand Down
27 changes: 7 additions & 20 deletions docs/generated/packages/angular/generators/pipe.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,16 @@
"additionalProperties": false,
"description": "Creates an Angular pipe.",
"properties": {
"name": {
"path": {
"type": "string",
"description": "The name of the pipe.",
"description": "The path at which to create the pipe file, relative to the workspace root.",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What name would you like to use for the pipe?"
},
"directory": {
"type": "string",
"description": "The directory at which to create the pipe file. When `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. Otherwise, it will be relative to the workspace root.",
"aliases": ["dir", "path"],
"x-priority": "important"
"x-prompt": "What is the path of the new pipe?"
},
"nameAndDirectoryFormat": {
"description": "Whether to generate the pipe in the directory as provided, relative to the current working directory and ignoring the project (`as-provided`) or generate it using the project and directory relative to the workspace root (`derived`).",
"type": "string",
"enum": ["as-provided", "derived"]
},
"project": {
"name": {
"type": "string",
"description": "The name of the project.",
"$default": { "$source": "projectName" },
"x-dropdown": "projects",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v20."
"description": "The name of the pipe.",
"x-prompt": "What name would you like to use for the pipe?"
},
"skipTests": {
"type": "boolean",
Expand Down Expand Up @@ -65,7 +52,7 @@
"description": "Skip formatting of files."
}
},
"required": ["name"],
"required": ["path"],
"presets": []
},
"description": "Generate an Angular Pipe",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,15 @@
"description": "Creates a new, generic Angular directive definition in the given or default project.",
"additionalProperties": false,
"properties": {
"path": {
"type": "string",
"description": "The path at which to create the SCAM Directive files, relative to the workspace root.",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What is the path of the new directive?"
},
"name": {
"type": "string",
"description": "The name of the directive.",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What name would you like to use for the directive?",
"x-priority": "important"
},
Expand Down Expand Up @@ -85,7 +90,7 @@
"x-priority": "internal"
}
},
"required": ["name"],
"required": ["path"],
"presets": []
},
"description": "Generate a directive with an accompanying Single Component Angular Module (SCAM).",
Expand Down
29 changes: 8 additions & 21 deletions docs/generated/packages/angular/generators/scam-pipe.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,38 +9,25 @@
"type": "object",
"examples": [
{
"command": "nx g @nx/angular:scam-pipe --project=my-lib --flat=false my-transformation",
"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": "Creates a new, generic Angular pipe definition in the given or default project.",
"additionalProperties": false,
"properties": {
"name": {
"path": {
"type": "string",
"description": "The name of the pipe.",
"description": "The path at which to create the pipe file, relative to the workspace root.",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What name would you like to use for the pipe?",
"x-priority": "important"
"x-prompt": "What is the path of the new pipe?"
},
"directory": {
"name": {
"type": "string",
"description": "The directory at which to create the component file. When `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. Otherwise, it will be relative to the workspace root.",
"aliases": ["dir", "path"],
"description": "The name of the pipe.",
"x-prompt": "What name would you like to use for the pipe?",
"x-priority": "important"
},
"nameAndDirectoryFormat": {
"description": "Whether to generate the component in the directory as provided, relative to the current working directory and ignoring the project (`as-provided`) or generate it using the project and directory relative to the workspace root (`derived`).",
"type": "string",
"enum": ["as-provided", "derived"]
},
"project": {
"type": "string",
"description": "The name of the project.",
"$default": { "$source": "projectName" },
"x-dropdown": "projects",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v20."
},
"skipTests": {
"type": "boolean",
"description": "Do not create `spec.ts` test files for the new pipe.",
Expand Down Expand Up @@ -71,7 +58,7 @@
"x-priority": "internal"
}
},
"required": ["name"],
"required": ["path"],
"presets": []
},
"description": "Generate a pipe with an accompanying Single Component Angular Module (SCAM).",
Expand Down
29 changes: 8 additions & 21 deletions docs/generated/packages/angular/generators/scam.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,36 +9,23 @@
"type": "object",
"examples": [
{
"command": "nx g @nx/angular:scam my-sample --directory=my-lib/src/lib/my-sample",
"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": "Creates a new Angular SCAM.",
"additionalProperties": false,
"properties": {
"name": {
"path": {
"type": "string",
"description": "The name of the component.",
"description": "The path at which to create the SCAM file, relative to the workspace root.",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What name would you like to use for the component?"
},
"directory": {
"type": "string",
"description": "The directory at which to create the SCAM files. When `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. Otherwise, it will be relative to the workspace root.",
"aliases": ["dir", "path"],
"x-priority": "important"
"x-prompt": "What is the path of the new SCAM?"
},
"nameAndDirectoryFormat": {
"description": "Whether to generate the SCAM in the directory as provided, relative to the current working directory and ignoring the project (`as-provided`) or generate it using the project and directory relative to the workspace root (`derived`).",
"type": "string",
"enum": ["as-provided", "derived"]
},
"project": {
"name": {
"type": "string",
"description": "The name of the project.",
"$default": { "$source": "projectName" },
"x-dropdown": "projects",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v20."
"description": "The name of the component.",
"x-prompt": "What name would you like to use for the component?"
},
"displayBlock": {
"description": "Specifies if the style will contain `:host { display: block; }`.",
Expand Down Expand Up @@ -125,7 +112,7 @@
"x-priority": "internal"
}
},
"required": ["name"],
"required": ["path"],
"presets": []
},
"description": "Generate a component with an accompanying Single Component Angular Module (SCAM).",
Expand Down
1 change: 0 additions & 1 deletion docs/generated/packages/nest/generators/controller.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"name": {
"description": "The name of the controller.",
"type": "string",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What name would you like to use?"
},
"skipFormat": {
Expand Down
3 changes: 1 addition & 2 deletions docs/generated/packages/nest/generators/resource.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"name": {
"type": "string",
"description": "The name of the resource.",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What name would you like to use for this resource (plural, e.g., `users`)?"
},
"skipFormat": {
Expand Down Expand Up @@ -80,7 +79,7 @@
}
},
"additionalProperties": false,
"required": ["name"],
"required": ["path"],
"presets": []
},
"description": "Run the `resource` NestJS generator with Nx project support.",
Expand Down
2 changes: 1 addition & 1 deletion docs/generated/packages/next/generators/page.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"x-priority": "internal"
}
},
"required": ["name"],
"required": ["path"],
"examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Create static page in an app\" %}\n\n```shell\nnx g page my-page --project=my-app\n```\n\n{% /tab %}\n{% tab label=\"Create dynamic page in an app\" %}\n\nThe following creates a page under `apps/my-app/pages/products/[id].tsx`.\n\n```shell\nnx g page \"[id]\" --project=my-app --directory=products\n```\n\n{% /tab %}\n\n{% /tabs %}\n",
"presets": []
},
Expand Down
19 changes: 7 additions & 12 deletions docs/generated/packages/plugin/generators/executor.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@
}
],
"properties": {
"name": {
"path": {
"type": "string",
"description": "Executor name.",
"description": "Path at which to generate the executor file.",
"x-prompt": "What path would you like to use for the executor?",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What name would you like to use for the executor?",
"x-priority": "important"
},
"directory": {
"name": {
"type": "string",
"description": "The directory at which to create the executor file. When `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. Otherwise, it will be relative to the workspace root.",
"aliases": ["dir"],
"description": "Executor name.",
"x-prompt": "What name would you like to use for the executor?",
"x-priority": "important"
},
"description": {
Expand All @@ -50,19 +50,14 @@
"default": false,
"description": "Do not add an eslint configuration for plugin json files."
},
"nameAndDirectoryFormat": {
"description": "Whether to generate the executor in the directory as provided, relative to the current working directory and ignoring the project (`as-provided`) or generate it using the project and directory relative to the workspace root (`derived`).",
"type": "string",
"enum": ["as-provided", "derived"]
},
"skipFormat": {
"type": "boolean",
"description": "Skip formatting files.",
"default": false,
"x-priority": "internal"
}
},
"required": ["name"],
"required": ["path"],
"additionalProperties": false,
"presets": []
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('componentStory generator', () => {
await generateTestLibrary(tree, { name: libName, skipFormat: true });
await componentGenerator(tree, {
name: 'test-button',
directory: `${libName}/src/lib/test-button`,
path: `${libName}/src/lib/test-button`,
skipFormat: true,
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('Angular Cypress Component Test Generator', () => {
skipFormat: true,
});
await componentGenerator(tree, {
directory: 'my-lib/src/lib/my-lib',
path: 'my-lib/src/lib/my-lib/my-lib',
name: 'my-lib',
skipFormat: true,
});
Expand All @@ -55,7 +55,7 @@ describe('Angular Cypress Component Test Generator', () => {
skipFormat: true,
});
await componentGenerator(tree, {
directory: 'my-lib/src/lib/my-lib',
path: 'my-lib/src/lib/my-lib/',
name: 'my-lib',
skipFormat: true,
});
Expand Down Expand Up @@ -109,7 +109,7 @@ export class MyLibComponent implements OnInit {
skipFormat: true,
});
await componentGenerator(tree, {
directory: 'my-lib/src/lib/my-lib',
path: 'my-lib/src/lib/my-lib',
name: 'my-lib',
standalone: true,
skipFormat: true,
Expand Down Expand Up @@ -164,7 +164,7 @@ export class MyLibComponent implements OnInit {

await componentGenerator(tree, {
name: 'my-lib',
directory: 'my-lib/src/lib/my-lib',
path: 'my-lib/src/lib/my-lib',
skipFormat: true,
});
tree.write(
Expand Down Expand Up @@ -195,7 +195,7 @@ export class MyLibComponent implements OnInit {

await componentGenerator(tree, {
name: 'my-lib',
directory: 'my-lib/src/lib/my-lib',
path: 'my-lib/src/lib/my-lib/my-lib',
skipFormat: true,
});

Expand Down
1 change: 0 additions & 1 deletion packages/angular/src/generators/component/schema.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
export interface Schema {
path: string;
name?: string;
nameAndDirectoryFormat?: NameAndDirectoryFormat;
displayBlock?: boolean;
inlineStyle?: boolean;
inlineTemplate?: boolean;
Expand Down
Loading

0 comments on commit e21adb5

Please sign in to comment.