@nx/angular 0.0.0-pr-29122-4727ac1 → 0.0.0-pr-29114-4447aa0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/angular",
3
- "version": "0.0.0-pr-29122-4727ac1",
3
+ "version": "0.0.0-pr-29114-4447aa0",
4
4
  "private": false,
5
5
  "description": "The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides: \n\n- Integration with libraries such as Storybook, Jest, ESLint, Tailwind CSS, Playwright and Cypress. \n\n- Generators to help scaffold code quickly (like: Micro Frontends, Libraries, both internal to your codebase and publishable to npm) \n\n- Single Component Application Modules (SCAMs) \n\n- NgRx helpers. \n\n- Utilities for automatic workspace refactoring.",
6
6
  "repository": {
@@ -78,13 +78,13 @@
78
78
  "semver": "^7.5.3",
79
79
  "tslib": "^2.3.0",
80
80
  "webpack-merge": "^5.8.0",
81
- "@nx/devkit": "0.0.0-pr-29122-4727ac1",
82
- "@nx/js": "0.0.0-pr-29122-4727ac1",
83
- "@nx/eslint": "0.0.0-pr-29122-4727ac1",
84
- "@nx/webpack": "0.0.0-pr-29122-4727ac1",
85
- "@nx/module-federation": "0.0.0-pr-29122-4727ac1",
86
- "@nx/web": "0.0.0-pr-29122-4727ac1",
87
- "@nx/workspace": "0.0.0-pr-29122-4727ac1",
81
+ "@nx/devkit": "0.0.0-pr-29114-4447aa0",
82
+ "@nx/js": "0.0.0-pr-29114-4447aa0",
83
+ "@nx/eslint": "0.0.0-pr-29114-4447aa0",
84
+ "@nx/webpack": "0.0.0-pr-29114-4447aa0",
85
+ "@nx/module-federation": "0.0.0-pr-29114-4447aa0",
86
+ "@nx/web": "0.0.0-pr-29114-4447aa0",
87
+ "@nx/workspace": "0.0.0-pr-29114-4447aa0",
88
88
  "piscina": "^4.4.0"
89
89
  },
90
90
  "peerDependencies": {
@@ -9,16 +9,17 @@
9
9
  "properties": {
10
10
  "path": {
11
11
  "type": "string",
12
- "description": "The file path to the component without the file extension and suffix. Relative to the current working directory.",
12
+ "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.",
13
13
  "$default": {
14
14
  "$source": "argv",
15
15
  "index": 0
16
16
  },
17
- "x-prompt": "What is the component file path?"
17
+ "x-prompt": "Where to create the component?"
18
18
  },
19
19
  "name": {
20
20
  "type": "string",
21
- "description": "The component symbol name. Defaults to the last segment of the file path."
21
+ "description": "The name of the component.",
22
+ "x-prompt": "What name would you like to use for the component?"
22
23
  },
23
24
  "prefix": {
24
25
  "type": "string",
@@ -1,3 +1,5 @@
1
+ import { NameAndDirectoryFormat } from '@nx/devkit/src/generators/artifact-name-and-directory-utils';
2
+
1
3
  export interface Schema {
2
4
  path: string;
3
5
  name?: string;
@@ -6,29 +6,20 @@
6
6
  "type": "object",
7
7
  "description": "Creates a new Angular directive.",
8
8
  "additionalProperties": false,
9
- "examples": [
10
- {
11
- "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`",
12
- "command": "nx g @nx/angular:directive mylib/src/lib/foo"
13
- },
14
- {
15
- "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`",
16
- "command": "nx g @nx/angular:directive mylib/src/lib/foo --name=custom"
17
- }
18
- ],
19
9
  "properties": {
20
10
  "path": {
21
11
  "type": "string",
22
- "description": "The file path to the directive without the file extension and suffix. Relative to the current working directory.",
12
+ "description": "The path at which to create the directive file.",
13
+ "x-prompt": "Where to put the directive?",
23
14
  "$default": {
24
15
  "$source": "argv",
25
16
  "index": 0
26
- },
27
- "x-prompt": "What is the directive file path?"
17
+ }
28
18
  },
29
19
  "name": {
30
20
  "type": "string",
31
- "description": "The directive symbol name. Defaults to the last segment of the file path."
21
+ "description": "The name of the new directive.",
22
+ "x-prompt": "What name would you like to use for the directive?"
32
23
  },
33
24
  "prefix": {
34
25
  "type": "string",
@@ -1,3 +1,5 @@
1
+ import { NameAndDirectoryFormat } from '@nx/devkit/src/generators/artifact-name-and-directory-utils';
2
+
1
3
  export interface Schema {
2
4
  path: string;
3
5
  name?: string;
@@ -6,29 +6,20 @@
6
6
  "cli": "nx",
7
7
  "additionalProperties": false,
8
8
  "description": "Creates an Angular pipe.",
9
- "examples": [
10
- {
11
- "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`",
12
- "command": "nx g @nx/angular:pipe mylib/src/lib/foo"
13
- },
14
- {
15
- "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`",
16
- "command": "nx g @nx/angular:pipe mylib/src/lib/foo --name=custom"
17
- }
18
- ],
19
9
  "properties": {
20
10
  "path": {
21
11
  "type": "string",
22
- "description": "The file path to the pipe without the file extension and suffix. Relative to the current working directory.",
12
+ "description": "The path at which to create the pipe file, relative to the workspace root.",
23
13
  "$default": {
24
14
  "$source": "argv",
25
15
  "index": 0
26
16
  },
27
- "x-prompt": "What is the pipe file path?"
17
+ "x-prompt": "What is the path of the new pipe?"
28
18
  },
29
19
  "name": {
30
20
  "type": "string",
31
- "description": "The pipe symbol name. Defaults to the last segment of the file path."
21
+ "description": "The name of the pipe.",
22
+ "x-prompt": "What name would you like to use for the pipe?"
32
23
  },
33
24
  "skipTests": {
34
25
  "type": "boolean",
@@ -1,3 +1,5 @@
1
+ import { NameAndDirectoryFormat } from '@nx/devkit/src/generators/artifact-name-and-directory-utils';
2
+
1
3
  export interface Schema {
2
4
  path: string;
3
5
  name?: string;
@@ -6,12 +6,8 @@
6
6
  "type": "object",
7
7
  "examples": [
8
8
  {
9
- "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`",
10
- "command": "nx g @nx/angular:scam mylib/src/lib/foo"
11
- },
12
- {
13
- "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`",
14
- "command": "nx g @nx/angular:scam mylib/src/lib/foo --name=custom"
9
+ "command": "nx g @nx/angular:scam my-lib/src/lib/my-sample/my-sample",
10
+ "description": "Generate a `MySampleComponent` component in the `my-lib` library."
15
11
  }
16
12
  ],
17
13
  "description": "Creates a new Angular SCAM.",
@@ -19,16 +15,17 @@
19
15
  "properties": {
20
16
  "path": {
21
17
  "type": "string",
22
- "description": "The file path to the SCAM without the file extension and suffix. Relative to the current working directory.",
18
+ "description": "The path at which to create the SCAM file, relative to the workspace root.",
23
19
  "$default": {
24
20
  "$source": "argv",
25
21
  "index": 0
26
22
  },
27
- "x-prompt": "What is the SCAM file path?"
23
+ "x-prompt": "What is the path of the new SCAM?"
28
24
  },
29
25
  "name": {
30
26
  "type": "string",
31
- "description": "The component symbol name. Defaults to the last segment of the file path."
27
+ "description": "The name of the component.",
28
+ "x-prompt": "What name would you like to use for the component?"
32
29
  },
33
30
  "displayBlock": {
34
31
  "description": "Specifies if the style will contain `:host { display: block; }`.",
@@ -1,3 +1,5 @@
1
+ import { NameAndDirectoryFormat } from '@nx/devkit/src/generators/artifact-name-and-directory-utils';
2
+
1
3
  export interface Schema {
2
4
  path: string;
3
5
  name?: string;
@@ -6,12 +6,8 @@
6
6
  "type": "object",
7
7
  "examples": [
8
8
  {
9
- "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`",
10
- "command": "nx g @nx/angular:scam-directive mylib/src/lib/foo"
11
- },
12
- {
13
- "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`",
14
- "command": "nx g @nx/angular:scam-directive mylib/src/lib/foo --name=custom"
9
+ "command": "nx g @nx/angular:scam-directive my-sample --directory=my-lib/src/lib/my-sample",
10
+ "description": "Generate a `MySampleDirective` directive in a `my-sample` folder in the `my-lib` library"
15
11
  }
16
12
  ],
17
13
  "description": "Creates a new, generic Angular directive definition in the given or default project.",
@@ -19,16 +15,38 @@
19
15
  "properties": {
20
16
  "path": {
21
17
  "type": "string",
22
- "description": "The file path to the SCAM directive without the file extension and suffix. Relative to the current working directory.",
18
+ "description": "The path at which to create the SCAM Directive files, relative to the workspace root.",
23
19
  "$default": {
24
20
  "$source": "argv",
25
21
  "index": 0
26
22
  },
27
- "x-prompt": "What is the SCAM directive file path?"
23
+ "x-prompt": "What is the path of the new directive?"
28
24
  },
29
25
  "name": {
30
26
  "type": "string",
31
- "description": "The directive symbol name. Defaults to the last segment of the file path."
27
+ "description": "The name of the directive.",
28
+ "x-prompt": "What name would you like to use for the directive?",
29
+ "x-priority": "important"
30
+ },
31
+ "directory": {
32
+ "type": "string",
33
+ "description": "The directory at which to create the SCAM Directive files. When `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. Otherwise, it will be relative to the workspace root.",
34
+ "aliases": ["dir", "path"],
35
+ "x-priority": "important"
36
+ },
37
+ "nameAndDirectoryFormat": {
38
+ "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`).",
39
+ "type": "string",
40
+ "enum": ["as-provided", "derived"]
41
+ },
42
+ "project": {
43
+ "type": "string",
44
+ "description": "The name of the project.",
45
+ "$default": {
46
+ "$source": "projectName"
47
+ },
48
+ "x-dropdown": "projects",
49
+ "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."
32
50
  },
33
51
  "skipTests": {
34
52
  "type": "boolean",
@@ -41,6 +59,12 @@
41
59
  "default": true,
42
60
  "x-priority": "important"
43
61
  },
62
+ "flat": {
63
+ "type": "boolean",
64
+ "description": "Create the new files at the top level of the current project.",
65
+ "default": true,
66
+ "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20."
67
+ },
44
68
  "selector": {
45
69
  "type": "string",
46
70
  "format": "html-selector",
@@ -1,3 +1,5 @@
1
+ import { NameAndDirectoryFormat } from '@nx/devkit/src/generators/artifact-name-and-directory-utils';
2
+
1
3
  export interface Schema {
2
4
  path: string;
3
5
  name?: string;
@@ -6,12 +6,8 @@
6
6
  "type": "object",
7
7
  "examples": [
8
8
  {
9
- "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`",
10
- "command": "nx g @nx/angular:scam-pipe mylib/src/lib/foo"
11
- },
12
- {
13
- "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`",
14
- "command": "nx g @nx/angular:scam-pipe mylib/src/lib/foo --name=custom"
9
+ "command": "nx g @nx/angular:scam-pipe mylib/src/lib/my-transformation/my-transformation",
10
+ "description": "Generates a `MyTransformationPipe` in a `my-transformation` folder in the `my-lib` project"
15
11
  }
16
12
  ],
17
13
  "description": "Creates a new, generic Angular pipe definition in the given or default project.",
@@ -19,16 +15,18 @@
19
15
  "properties": {
20
16
  "path": {
21
17
  "type": "string",
22
- "description": "The file path to the SCAM pipe without the file extension and suffix. Relative to the current working directory.",
18
+ "description": "The path at which to create the pipe file, relative to the workspace root.",
23
19
  "$default": {
24
20
  "$source": "argv",
25
21
  "index": 0
26
22
  },
27
- "x-prompt": "What is the SCAM pipe file path?"
23
+ "x-prompt": "What is the path of the new pipe?"
28
24
  },
29
25
  "name": {
30
26
  "type": "string",
31
- "description": "The pipe symbol name. Defaults to the last segment of the file path."
27
+ "description": "The name of the pipe.",
28
+ "x-prompt": "What name would you like to use for the pipe?",
29
+ "x-priority": "important"
32
30
  },
33
31
  "skipTests": {
34
32
  "type": "boolean",
@@ -41,6 +39,12 @@
41
39
  "default": true,
42
40
  "x-priority": "important"
43
41
  },
42
+ "flat": {
43
+ "type": "boolean",
44
+ "description": "Create the new files at the top level of the current project.",
45
+ "default": true,
46
+ "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20."
47
+ },
44
48
  "export": {
45
49
  "type": "boolean",
46
50
  "description": "Specifies if the SCAM should be exported from the project's entry point (normally `index.ts`). It only applies to libraries.",