@nx/plugin 22.7.0-beta.8 → 22.7.0-beta.9

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/generators.json CHANGED
@@ -1,49 +1,49 @@
1
1
  {
2
- "name": "nx/plugin",
3
- "version": "0.1",
4
- "extends": ["@nx/workspace"],
5
- "generators": {
6
- "plugin": {
7
- "factory": "./src/generators/plugin/plugin#pluginGeneratorInternal",
8
- "schema": "./src/generators/plugin/schema.json",
9
- "description": "Create a Nx Plugin."
10
- },
11
- "create-package": {
12
- "factory": "./src/generators/create-package/create-package#createPackageGeneratorInternal",
13
- "schema": "./src/generators/create-package/schema.json",
14
- "description": "Create a package which can be used by npx to create a new workspace"
15
- },
16
- "e2e-project": {
17
- "factory": "./src/generators/e2e-project/e2e#e2eProjectGeneratorInternal",
18
- "schema": "./src/generators/e2e-project/schema.json",
19
- "description": "Create a E2E application for a Nx Plugin."
20
- },
21
- "migration": {
22
- "factory": "./src/generators/migration/migration",
23
- "schema": "./src/generators/migration/schema.json",
24
- "description": "Create a migration for an Nx Plugin."
25
- },
26
- "generator": {
27
- "factory": "./src/generators/generator/generator",
28
- "schema": "./src/generators/generator/schema.json",
29
- "description": "Create a generator for an Nx Plugin."
30
- },
31
- "executor": {
32
- "factory": "./src/generators/executor/executor",
33
- "schema": "./src/generators/executor/schema.json",
34
- "description": "Create an executor for an Nx Plugin."
35
- },
36
- "plugin-lint-checks": {
37
- "factory": "./src/generators/lint-checks/generator",
38
- "schema": "./src/generators/lint-checks/schema.json",
39
- "description": "Adds linting configuration to validate common json files for nx plugins."
40
- },
41
- "preset": {
42
- "factory": "./src/generators/preset/generator#presetGeneratorInternal",
43
- "schema": "./src/generators/preset/schema.json",
44
- "description": "Initializes a workspace with an nx-plugin inside of it. Use as: `create-nx-workspace --preset @nx/plugin`.",
45
- "hidden": true,
46
- "x-use-standalone-layout": true
2
+ "name": "nx/plugin",
3
+ "version": "0.1",
4
+ "extends": ["@nx/workspace"],
5
+ "generators": {
6
+ "plugin": {
7
+ "factory": "./src/generators/plugin/plugin#pluginGeneratorInternal",
8
+ "schema": "./src/generators/plugin/schema.json",
9
+ "description": "Create a Nx Plugin."
10
+ },
11
+ "create-package": {
12
+ "factory": "./src/generators/create-package/create-package#createPackageGeneratorInternal",
13
+ "schema": "./src/generators/create-package/schema.json",
14
+ "description": "Create a package which can be used by npx to create a new workspace"
15
+ },
16
+ "e2e-project": {
17
+ "factory": "./src/generators/e2e-project/e2e#e2eProjectGeneratorInternal",
18
+ "schema": "./src/generators/e2e-project/schema.json",
19
+ "description": "Create a E2E application for a Nx Plugin."
20
+ },
21
+ "migration": {
22
+ "factory": "./src/generators/migration/migration",
23
+ "schema": "./src/generators/migration/schema.json",
24
+ "description": "Create a migration for an Nx Plugin."
25
+ },
26
+ "generator": {
27
+ "factory": "./src/generators/generator/generator",
28
+ "schema": "./src/generators/generator/schema.json",
29
+ "description": "Create a generator for an Nx Plugin."
30
+ },
31
+ "executor": {
32
+ "factory": "./src/generators/executor/executor",
33
+ "schema": "./src/generators/executor/schema.json",
34
+ "description": "Create an executor for an Nx Plugin."
35
+ },
36
+ "plugin-lint-checks": {
37
+ "factory": "./src/generators/lint-checks/generator",
38
+ "schema": "./src/generators/lint-checks/schema.json",
39
+ "description": "Adds linting configuration to validate common json files for nx plugins."
40
+ },
41
+ "preset": {
42
+ "factory": "./src/generators/preset/generator#presetGeneratorInternal",
43
+ "schema": "./src/generators/preset/schema.json",
44
+ "description": "Initializes a workspace with an nx-plugin inside of it. Use as: `create-nx-workspace --preset @nx/plugin`.",
45
+ "hidden": true,
46
+ "x-use-standalone-layout": true
47
+ }
47
48
  }
48
- }
49
49
  }
package/migrations.json CHANGED
@@ -1,3 +1,3 @@
1
1
  {
2
- "generators": {}
2
+ "generators": {}
3
3
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/plugin",
3
- "version": "22.7.0-beta.8",
3
+ "version": "22.7.0-beta.9",
4
4
  "private": false,
5
5
  "description": "This plugin is used to create Nx plugins! It contains generators for generating common plugin features like generators, executors, migrations and more.",
6
6
  "repository": {
@@ -29,13 +29,13 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "tslib": "^2.3.0",
32
- "@nx/devkit": "22.7.0-beta.8",
33
- "@nx/jest": "22.7.0-beta.8",
34
- "@nx/js": "22.7.0-beta.8",
35
- "@nx/eslint": "22.7.0-beta.8"
32
+ "@nx/devkit": "22.7.0-beta.9",
33
+ "@nx/jest": "22.7.0-beta.9",
34
+ "@nx/js": "22.7.0-beta.9",
35
+ "@nx/eslint": "22.7.0-beta.9"
36
36
  },
37
37
  "devDependencies": {
38
- "nx": "22.7.0-beta.8"
38
+ "nx": "22.7.0-beta.9"
39
39
  },
40
40
  "publishConfig": {
41
41
  "access": "public"
@@ -1,72 +1,72 @@
1
1
  {
2
- "$schema": "https://json-schema.org/schema",
3
- "cli": "nx",
4
- "$id": "NxPluginCreatePackage",
5
- "title": "Create a framework package",
6
- "description": "Create a framework package that uses Nx CLI.",
7
- "examplesFile": "../../../docs/generators/create-package-examples.md",
8
- "type": "object",
9
- "properties": {
10
- "directory": {
11
- "type": "string",
12
- "description": "A directory where the app is placed.",
13
- "$default": {
14
- "$source": "argv",
15
- "index": 0
16
- }
2
+ "$schema": "https://json-schema.org/schema",
3
+ "cli": "nx",
4
+ "$id": "NxPluginCreatePackage",
5
+ "title": "Create a framework package",
6
+ "description": "Create a framework package that uses Nx CLI.",
7
+ "examplesFile": "../../../docs/generators/create-package-examples.md",
8
+ "type": "object",
9
+ "properties": {
10
+ "directory": {
11
+ "type": "string",
12
+ "description": "A directory where the app is placed.",
13
+ "$default": {
14
+ "$source": "argv",
15
+ "index": 0
16
+ }
17
+ },
18
+ "name": {
19
+ "type": "string",
20
+ "description": "The package name of cli, e.g. `create-framework-package`. Note this must be a valid NPM name to be published.",
21
+ "pattern": "create-.+|^@.+/create(?:-.+)?",
22
+ "x-priority": "important"
23
+ },
24
+ "project": {
25
+ "type": "string",
26
+ "description": "The name of the generator project.",
27
+ "alias": "p",
28
+ "$default": {
29
+ "$source": "projectName"
30
+ },
31
+ "x-prompt": "What is the name of the project for the generator?",
32
+ "x-priority": "important"
33
+ },
34
+ "unitTestRunner": {
35
+ "type": "string",
36
+ "enum": ["none", "jest", "vitest"],
37
+ "description": "Test runner to use for unit tests."
38
+ },
39
+ "linter": {
40
+ "description": "The tool to use for running lint checks.",
41
+ "type": "string",
42
+ "enum": ["none", "eslint"]
43
+ },
44
+ "tags": {
45
+ "type": "string",
46
+ "description": "Add tags to the library (used for linting).",
47
+ "alias": "t"
48
+ },
49
+ "skipFormat": {
50
+ "description": "Skip formatting files.",
51
+ "type": "boolean",
52
+ "default": false,
53
+ "x-priority": "internal"
54
+ },
55
+ "compiler": {
56
+ "type": "string",
57
+ "enum": ["tsc", "swc"],
58
+ "default": "tsc",
59
+ "description": "The compiler used by the build and test targets."
60
+ },
61
+ "e2eProject": {
62
+ "type": "string",
63
+ "description": "The name of the e2e project.",
64
+ "x-prompt": "What is the name of the e2e project? Leave blank to skip e2e tests"
65
+ },
66
+ "useProjectJson": {
67
+ "type": "boolean",
68
+ "description": "Use a `project.json` configuration file instead of inlining the Nx configuration in the `package.json` file."
69
+ }
17
70
  },
18
- "name": {
19
- "type": "string",
20
- "description": "The package name of cli, e.g. `create-framework-package`. Note this must be a valid NPM name to be published.",
21
- "pattern": "create-.+|^@.+/create(?:-.+)?",
22
- "x-priority": "important"
23
- },
24
- "project": {
25
- "type": "string",
26
- "description": "The name of the generator project.",
27
- "alias": "p",
28
- "$default": {
29
- "$source": "projectName"
30
- },
31
- "x-prompt": "What is the name of the project for the generator?",
32
- "x-priority": "important"
33
- },
34
- "unitTestRunner": {
35
- "type": "string",
36
- "enum": ["none", "jest", "vitest"],
37
- "description": "Test runner to use for unit tests."
38
- },
39
- "linter": {
40
- "description": "The tool to use for running lint checks.",
41
- "type": "string",
42
- "enum": ["none", "eslint"]
43
- },
44
- "tags": {
45
- "type": "string",
46
- "description": "Add tags to the library (used for linting).",
47
- "alias": "t"
48
- },
49
- "skipFormat": {
50
- "description": "Skip formatting files.",
51
- "type": "boolean",
52
- "default": false,
53
- "x-priority": "internal"
54
- },
55
- "compiler": {
56
- "type": "string",
57
- "enum": ["tsc", "swc"],
58
- "default": "tsc",
59
- "description": "The compiler used by the build and test targets."
60
- },
61
- "e2eProject": {
62
- "type": "string",
63
- "description": "The name of the e2e project.",
64
- "x-prompt": "What is the name of the e2e project? Leave blank to skip e2e tests"
65
- },
66
- "useProjectJson": {
67
- "type": "boolean",
68
- "description": "Use a `project.json` configuration file instead of inlining the Nx configuration in the `package.json` file."
69
- }
70
- },
71
- "required": ["directory", "name", "project"]
71
+ "required": ["directory", "name", "project"]
72
72
  }
@@ -1,55 +1,55 @@
1
1
  {
2
- "$schema": "https://json-schema.org/schema",
3
- "cli": "nx",
4
- "$id": "NxPluginE2E",
5
- "title": "Create an E2E app for a Nx Plugin",
6
- "description": "Create an E2E app for a Nx Plugin.",
7
- "examplesFile": "../../../docs/generators/e2e-project-examples.md",
8
- "type": "object",
9
- "properties": {
10
- "pluginName": {
11
- "type": "string",
12
- "description": "the project name of the plugin to be tested.",
13
- "x-priority": "important"
14
- },
15
- "npmPackageName": {
16
- "type": "string",
17
- "description": "the package name of the plugin as it would be published to NPM.",
18
- "x-priority": "important"
19
- },
20
- "projectDirectory": {
21
- "type": "string",
22
- "description": "the directory where the plugin is placed."
23
- },
24
- "pluginOutputPath": {
25
- "type": "string",
26
- "description": "the output path of the plugin after it builds.",
27
- "x-priority": "important"
28
- },
29
- "jestConfig": {
30
- "type": "string",
31
- "description": "Jest config file."
32
- },
33
- "linter": {
34
- "description": "The tool to use for running lint checks.",
35
- "type": "string",
36
- "enum": ["none", "eslint"]
37
- },
38
- "minimal": {
39
- "type": "boolean",
40
- "description": "Generate the e2e project with a minimal setup. This would involve not generating tests for a default executor and generator.",
41
- "default": false
42
- },
43
- "skipFormat": {
44
- "description": "Skip formatting files.",
45
- "type": "boolean",
46
- "default": false,
47
- "x-priority": "internal"
48
- },
49
- "useProjectJson": {
50
- "type": "boolean",
51
- "description": "Use a `project.json` configuration file instead of inlining the Nx configuration in the `package.json` file."
52
- }
53
- },
54
- "required": ["pluginName", "npmPackageName"]
2
+ "$schema": "https://json-schema.org/schema",
3
+ "cli": "nx",
4
+ "$id": "NxPluginE2E",
5
+ "title": "Create an E2E app for a Nx Plugin",
6
+ "description": "Create an E2E app for a Nx Plugin.",
7
+ "examplesFile": "../../../docs/generators/e2e-project-examples.md",
8
+ "type": "object",
9
+ "properties": {
10
+ "pluginName": {
11
+ "type": "string",
12
+ "description": "the project name of the plugin to be tested.",
13
+ "x-priority": "important"
14
+ },
15
+ "npmPackageName": {
16
+ "type": "string",
17
+ "description": "the package name of the plugin as it would be published to NPM.",
18
+ "x-priority": "important"
19
+ },
20
+ "projectDirectory": {
21
+ "type": "string",
22
+ "description": "the directory where the plugin is placed."
23
+ },
24
+ "pluginOutputPath": {
25
+ "type": "string",
26
+ "description": "the output path of the plugin after it builds.",
27
+ "x-priority": "important"
28
+ },
29
+ "jestConfig": {
30
+ "type": "string",
31
+ "description": "Jest config file."
32
+ },
33
+ "linter": {
34
+ "description": "The tool to use for running lint checks.",
35
+ "type": "string",
36
+ "enum": ["none", "eslint"]
37
+ },
38
+ "minimal": {
39
+ "type": "boolean",
40
+ "description": "Generate the e2e project with a minimal setup. This would involve not generating tests for a default executor and generator.",
41
+ "default": false
42
+ },
43
+ "skipFormat": {
44
+ "description": "Skip formatting files.",
45
+ "type": "boolean",
46
+ "default": false,
47
+ "x-priority": "internal"
48
+ },
49
+ "useProjectJson": {
50
+ "type": "boolean",
51
+ "description": "Use a `project.json` configuration file instead of inlining the Nx configuration in the `package.json` file."
52
+ }
53
+ },
54
+ "required": ["pluginName", "npmPackageName"]
55
55
  }
@@ -1,54 +1,54 @@
1
1
  {
2
- "$schema": "https://json-schema.org/schema",
3
- "cli": "nx",
4
- "$id": "NxPluginExecutor",
5
- "title": "Create an Executor for an Nx Plugin",
6
- "description": "Create an Executor for an Nx Plugin.",
7
- "examplesFile": "../../../docs/generators/executor-examples.md",
8
- "type": "object",
9
- "properties": {
10
- "path": {
11
- "type": "string",
12
- "description": "The file path to the executor. Relative to the current working directory.",
13
- "x-prompt": "What is the executor file path?",
14
- "$default": {
15
- "$source": "argv",
16
- "index": 0
17
- },
18
- "x-priority": "important"
2
+ "$schema": "https://json-schema.org/schema",
3
+ "cli": "nx",
4
+ "$id": "NxPluginExecutor",
5
+ "title": "Create an Executor for an Nx Plugin",
6
+ "description": "Create an Executor for an Nx Plugin.",
7
+ "examplesFile": "../../../docs/generators/executor-examples.md",
8
+ "type": "object",
9
+ "properties": {
10
+ "path": {
11
+ "type": "string",
12
+ "description": "The file path to the executor. Relative to the current working directory.",
13
+ "x-prompt": "What is the executor file path?",
14
+ "$default": {
15
+ "$source": "argv",
16
+ "index": 0
17
+ },
18
+ "x-priority": "important"
19
+ },
20
+ "name": {
21
+ "type": "string",
22
+ "description": "The executor name to export in the plugin executors collection."
23
+ },
24
+ "description": {
25
+ "type": "string",
26
+ "description": "Executor description.",
27
+ "x-priority": "important"
28
+ },
29
+ "unitTestRunner": {
30
+ "type": "string",
31
+ "enum": ["jest", "vitest", "none"],
32
+ "description": "Test runner to use for unit tests.",
33
+ "default": "jest"
34
+ },
35
+ "includeHasher": {
36
+ "type": "boolean",
37
+ "default": false,
38
+ "description": "Should the boilerplate for a custom hasher be generated?"
39
+ },
40
+ "skipLintChecks": {
41
+ "type": "boolean",
42
+ "default": false,
43
+ "description": "Do not add an eslint configuration for plugin json files."
44
+ },
45
+ "skipFormat": {
46
+ "type": "boolean",
47
+ "description": "Skip formatting files.",
48
+ "default": false,
49
+ "x-priority": "internal"
50
+ }
19
51
  },
20
- "name": {
21
- "type": "string",
22
- "description": "The executor name to export in the plugin executors collection."
23
- },
24
- "description": {
25
- "type": "string",
26
- "description": "Executor description.",
27
- "x-priority": "important"
28
- },
29
- "unitTestRunner": {
30
- "type": "string",
31
- "enum": ["jest", "vitest", "none"],
32
- "description": "Test runner to use for unit tests.",
33
- "default": "jest"
34
- },
35
- "includeHasher": {
36
- "type": "boolean",
37
- "default": false,
38
- "description": "Should the boilerplate for a custom hasher be generated?"
39
- },
40
- "skipLintChecks": {
41
- "type": "boolean",
42
- "default": false,
43
- "description": "Do not add an eslint configuration for plugin json files."
44
- },
45
- "skipFormat": {
46
- "type": "boolean",
47
- "description": "Skip formatting files.",
48
- "default": false,
49
- "x-priority": "internal"
50
- }
51
- },
52
- "required": ["path"],
53
- "additionalProperties": false
52
+ "required": ["path"],
53
+ "additionalProperties": false
54
54
  }
@@ -1,62 +1,62 @@
1
1
  {
2
- "$schema": "https://json-schema.org/schema",
3
- "cli": "nx",
4
- "$id": "NxPluginGenerator",
5
- "title": "Create a Generator for an Nx Plugin",
6
- "description": "Create a Generator for an Nx Plugin.",
7
- "type": "object",
8
- "examples": [
9
- {
10
- "description": "Generate a generator exported with the name matching the file name. It results in the generator `foo` at `mylib/src/generators/foo.ts`",
11
- "command": "nx g @nx/plugin:generator mylib/src/generators/foo.ts"
2
+ "$schema": "https://json-schema.org/schema",
3
+ "cli": "nx",
4
+ "$id": "NxPluginGenerator",
5
+ "title": "Create a Generator for an Nx Plugin",
6
+ "description": "Create a Generator for an Nx Plugin.",
7
+ "type": "object",
8
+ "examples": [
9
+ {
10
+ "description": "Generate a generator exported with the name matching the file name. It results in the generator `foo` at `mylib/src/generators/foo.ts`",
11
+ "command": "nx g @nx/plugin:generator mylib/src/generators/foo.ts"
12
+ },
13
+ {
14
+ "description": "Generate a generator without providing the file extension. It results in the generator `foo` at `mylib/src/generators/foo.ts`",
15
+ "command": "nx g @nx/plugin:generator mylib/src/generators/foo"
16
+ },
17
+ {
18
+ "description": "Generate a generator exported with a different name from the file name. It results in the generator `custom` at `mylib/src/generators/foo.ts`",
19
+ "command": "nx g @nx/plugin:generator mylib/src/generators/foo --name=custom"
20
+ }
21
+ ],
22
+ "properties": {
23
+ "path": {
24
+ "type": "string",
25
+ "description": "The file path to the generator. Relative to the current working directory.",
26
+ "$default": {
27
+ "$source": "argv",
28
+ "index": 0
29
+ },
30
+ "x-prompt": "What is the generator file path?",
31
+ "x-priority": "important"
32
+ },
33
+ "name": {
34
+ "type": "string",
35
+ "description": "The generator name to export in the plugin generators collection."
36
+ },
37
+ "description": {
38
+ "type": "string",
39
+ "description": "Generator description.",
40
+ "x-priority": "important"
41
+ },
42
+ "unitTestRunner": {
43
+ "type": "string",
44
+ "enum": ["jest", "vitest", "none"],
45
+ "description": "Test runner to use for unit tests.",
46
+ "default": "jest"
47
+ },
48
+ "skipLintChecks": {
49
+ "type": "boolean",
50
+ "default": false,
51
+ "description": "Do not add an eslint configuration for plugin json files."
52
+ },
53
+ "skipFormat": {
54
+ "type": "boolean",
55
+ "default": false,
56
+ "description": "Do not format files with prettier.",
57
+ "x-priority": "internal"
58
+ }
12
59
  },
13
- {
14
- "description": "Generate a generator without providing the file extension. It results in the generator `foo` at `mylib/src/generators/foo.ts`",
15
- "command": "nx g @nx/plugin:generator mylib/src/generators/foo"
16
- },
17
- {
18
- "description": "Generate a generator exported with a different name from the file name. It results in the generator `custom` at `mylib/src/generators/foo.ts`",
19
- "command": "nx g @nx/plugin:generator mylib/src/generators/foo --name=custom"
20
- }
21
- ],
22
- "properties": {
23
- "path": {
24
- "type": "string",
25
- "description": "The file path to the generator. Relative to the current working directory.",
26
- "$default": {
27
- "$source": "argv",
28
- "index": 0
29
- },
30
- "x-prompt": "What is the generator file path?",
31
- "x-priority": "important"
32
- },
33
- "name": {
34
- "type": "string",
35
- "description": "The generator name to export in the plugin generators collection."
36
- },
37
- "description": {
38
- "type": "string",
39
- "description": "Generator description.",
40
- "x-priority": "important"
41
- },
42
- "unitTestRunner": {
43
- "type": "string",
44
- "enum": ["jest", "vitest", "none"],
45
- "description": "Test runner to use for unit tests.",
46
- "default": "jest"
47
- },
48
- "skipLintChecks": {
49
- "type": "boolean",
50
- "default": false,
51
- "description": "Do not add an eslint configuration for plugin json files."
52
- },
53
- "skipFormat": {
54
- "type": "boolean",
55
- "default": false,
56
- "description": "Do not format files with prettier.",
57
- "x-priority": "internal"
58
- }
59
- },
60
- "required": ["path"],
61
- "additionalProperties": false
60
+ "required": ["path"],
61
+ "additionalProperties": false
62
62
  }
@@ -1,31 +1,31 @@
1
1
  {
2
- "$schema": "https://json-schema.org/schema",
3
- "cli": "nx",
4
- "$id": "PluginLint",
5
- "title": "",
6
- "type": "object",
7
- "description": "Adds linting configuration to validate common json files for nx plugins.",
8
- "examples": [
9
- {
10
- "command": "nx g @nx/plugin:lint-checks",
11
- "description": "Sets up linting configuration to validate common json files for an nx plugin project."
12
- }
13
- ],
14
- "properties": {
15
- "projectName": {
16
- "type": "string",
17
- "description": "Which project should be the configuration be added to?",
18
- "$default": {
19
- "$source": "projectName"
20
- },
21
- "x-priority": "important"
2
+ "$schema": "https://json-schema.org/schema",
3
+ "cli": "nx",
4
+ "$id": "PluginLint",
5
+ "title": "",
6
+ "type": "object",
7
+ "description": "Adds linting configuration to validate common json files for nx plugins.",
8
+ "examples": [
9
+ {
10
+ "command": "nx g @nx/plugin:lint-checks",
11
+ "description": "Sets up linting configuration to validate common json files for an nx plugin project."
12
+ }
13
+ ],
14
+ "properties": {
15
+ "projectName": {
16
+ "type": "string",
17
+ "description": "Which project should be the configuration be added to?",
18
+ "$default": {
19
+ "$source": "projectName"
20
+ },
21
+ "x-priority": "important"
22
+ },
23
+ "skipFormat": {
24
+ "type": "boolean",
25
+ "x-priority": "internal",
26
+ "description": "Skip formatting files with prettier.",
27
+ "default": false
28
+ }
22
29
  },
23
- "skipFormat": {
24
- "type": "boolean",
25
- "x-priority": "internal",
26
- "description": "Skip formatting files with prettier.",
27
- "default": false
28
- }
29
- },
30
- "required": ["projectName"]
30
+ "required": ["projectName"]
31
31
  }
@@ -1,62 +1,62 @@
1
1
  {
2
- "$schema": "https://json-schema.org/schema",
3
- "cli": "nx",
4
- "$id": "NxPluginMigration",
5
- "title": "Create a Migration for an Nx Plugin",
6
- "description": "Create a Migration for an Nx Plugin.",
7
- "type": "object",
8
- "examples": [
9
- {
10
- "description": "Generate a migration exported with the name matching the file name, which will be triggered when migrating to version 1.0.0 or above from a previous version. It results in the migration `foo` at `mylib/src/migrations/foo.ts`",
11
- "command": "nx g @nx/plugin:migration mylib/src/migrations/foo.ts -v=1.0.0"
2
+ "$schema": "https://json-schema.org/schema",
3
+ "cli": "nx",
4
+ "$id": "NxPluginMigration",
5
+ "title": "Create a Migration for an Nx Plugin",
6
+ "description": "Create a Migration for an Nx Plugin.",
7
+ "type": "object",
8
+ "examples": [
9
+ {
10
+ "description": "Generate a migration exported with the name matching the file name, which will be triggered when migrating to version 1.0.0 or above from a previous version. It results in the migration `foo` at `mylib/src/migrations/foo.ts`",
11
+ "command": "nx g @nx/plugin:migration mylib/src/migrations/foo.ts -v=1.0.0"
12
+ },
13
+ {
14
+ "description": "Generate a migration without providing the file extension, which will be triggered when migrating to version 1.0.0 or above from a previous version. It results in the migration `foo` at `mylib/src/migrations/foo.ts`",
15
+ "command": "nx g @nx/plugin:migration mylib/src/migrations/foo -v=1.0.0"
16
+ },
17
+ {
18
+ "description": "Generate a migration exported with a different name from the file name, which will be triggered when migrating to version 1.0.0 or above from a previous version. It results in the migration `custom` at `mylib/src/migrations/foo.ts`",
19
+ "command": "nx g @nx/plugin:migration mylib/src/migrations/foo --name=custom -v=1.0.0"
20
+ }
21
+ ],
22
+ "properties": {
23
+ "path": {
24
+ "type": "string",
25
+ "description": "The file path to the migration without the file extension. Relative to the current working directory.",
26
+ "$default": {
27
+ "$source": "argv",
28
+ "index": 0
29
+ },
30
+ "x-prompt": "What is the migration file path?",
31
+ "x-priority": "important"
32
+ },
33
+ "name": {
34
+ "type": "string",
35
+ "description": "The migration name to export in the plugin migrations collection."
36
+ },
37
+ "description": {
38
+ "type": "string",
39
+ "description": "Migration description."
40
+ },
41
+ "packageVersion": {
42
+ "type": "string",
43
+ "description": "Version to use for the migration.",
44
+ "alias": "v",
45
+ "x-prompt": "What version would you like to use for the migration?",
46
+ "x-priority": "important"
47
+ },
48
+ "packageJsonUpdates": {
49
+ "type": "boolean",
50
+ "description": "Whether or not to include `package.json` updates.",
51
+ "alias": "p",
52
+ "default": false
53
+ },
54
+ "skipLintChecks": {
55
+ "type": "boolean",
56
+ "default": false,
57
+ "description": "Do not eslint configuration for plugin json files."
58
+ }
12
59
  },
13
- {
14
- "description": "Generate a migration without providing the file extension, which will be triggered when migrating to version 1.0.0 or above from a previous version. It results in the migration `foo` at `mylib/src/migrations/foo.ts`",
15
- "command": "nx g @nx/plugin:migration mylib/src/migrations/foo -v=1.0.0"
16
- },
17
- {
18
- "description": "Generate a migration exported with a different name from the file name, which will be triggered when migrating to version 1.0.0 or above from a previous version. It results in the migration `custom` at `mylib/src/migrations/foo.ts`",
19
- "command": "nx g @nx/plugin:migration mylib/src/migrations/foo --name=custom -v=1.0.0"
20
- }
21
- ],
22
- "properties": {
23
- "path": {
24
- "type": "string",
25
- "description": "The file path to the migration without the file extension. Relative to the current working directory.",
26
- "$default": {
27
- "$source": "argv",
28
- "index": 0
29
- },
30
- "x-prompt": "What is the migration file path?",
31
- "x-priority": "important"
32
- },
33
- "name": {
34
- "type": "string",
35
- "description": "The migration name to export in the plugin migrations collection."
36
- },
37
- "description": {
38
- "type": "string",
39
- "description": "Migration description."
40
- },
41
- "packageVersion": {
42
- "type": "string",
43
- "description": "Version to use for the migration.",
44
- "alias": "v",
45
- "x-prompt": "What version would you like to use for the migration?",
46
- "x-priority": "important"
47
- },
48
- "packageJsonUpdates": {
49
- "type": "boolean",
50
- "description": "Whether or not to include `package.json` updates.",
51
- "alias": "p",
52
- "default": false
53
- },
54
- "skipLintChecks": {
55
- "type": "boolean",
56
- "default": false,
57
- "description": "Do not eslint configuration for plugin json files."
58
- }
59
- },
60
- "required": ["packageVersion", "path"],
61
- "additionalProperties": false
60
+ "required": ["packageVersion", "path"],
61
+ "additionalProperties": false
62
62
  }
@@ -1,106 +1,106 @@
1
1
  {
2
- "$schema": "https://json-schema.org/schema",
3
- "cli": "nx",
4
- "$id": "NxPluginPlugin",
5
- "title": "Create a Plugin for Nx",
6
- "description": "Create a Plugin for Nx.",
7
- "type": "object",
8
- "examples": [
9
- {
10
- "command": "nx g plugin my-plugin --directory=plugins --importPath=@myorg/my-plugin",
11
- "description": "Generates an Nx plugin project called `plugins-my-plugin` at `libs/plugins/my-plugin`. The project will have an npm package name and import path of `@myorg/my-plugin`."
12
- }
13
- ],
14
- "properties": {
15
- "directory": {
16
- "type": "string",
17
- "description": "A directory where the plugin is placed.",
18
- "$default": {
19
- "$source": "argv",
20
- "index": 0
21
- },
22
- "x-prompt": "Which directory do you want to create the plugin in?"
2
+ "$schema": "https://json-schema.org/schema",
3
+ "cli": "nx",
4
+ "$id": "NxPluginPlugin",
5
+ "title": "Create a Plugin for Nx",
6
+ "description": "Create a Plugin for Nx.",
7
+ "type": "object",
8
+ "examples": [
9
+ {
10
+ "command": "nx g plugin my-plugin --directory=plugins --importPath=@myorg/my-plugin",
11
+ "description": "Generates an Nx plugin project called `plugins-my-plugin` at `libs/plugins/my-plugin`. The project will have an npm package name and import path of `@myorg/my-plugin`."
12
+ }
13
+ ],
14
+ "properties": {
15
+ "directory": {
16
+ "type": "string",
17
+ "description": "A directory where the plugin is placed.",
18
+ "$default": {
19
+ "$source": "argv",
20
+ "index": 0
21
+ },
22
+ "x-prompt": "Which directory do you want to create the plugin in?"
23
+ },
24
+ "name": {
25
+ "type": "string",
26
+ "description": "Plugin name",
27
+ "x-priority": "important"
28
+ },
29
+ "importPath": {
30
+ "type": "string",
31
+ "description": "How the plugin will be published, like `@myorg/my-awesome-plugin`. Note this must be a valid NPM name.",
32
+ "x-priority": "important"
33
+ },
34
+ "linter": {
35
+ "description": "The tool to use for running lint checks.",
36
+ "type": "string",
37
+ "enum": ["none", "eslint"],
38
+ "x-priority": "important"
39
+ },
40
+ "unitTestRunner": {
41
+ "description": "Test runner to use for unit tests.",
42
+ "type": "string",
43
+ "enum": ["none", "jest", "vitest"],
44
+ "x-priority": "important"
45
+ },
46
+ "tags": {
47
+ "type": "string",
48
+ "description": "Add tags to the library (used for linting).",
49
+ "alias": "t"
50
+ },
51
+ "skipFormat": {
52
+ "description": "Skip formatting files.",
53
+ "type": "boolean",
54
+ "default": false,
55
+ "x-priority": "internal"
56
+ },
57
+ "skipTsConfig": {
58
+ "type": "boolean",
59
+ "default": false,
60
+ "description": "Do not update tsconfig.json for development experience.",
61
+ "x-priority": "internal"
62
+ },
63
+ "skipLintChecks": {
64
+ "type": "boolean",
65
+ "default": false,
66
+ "description": "Do not eslint configuration for plugin json files."
67
+ },
68
+ "e2eTestRunner": {
69
+ "type": "string",
70
+ "enum": ["jest", "none"],
71
+ "description": "Test runner to use for end to end (E2E) tests.",
72
+ "default": "none"
73
+ },
74
+ "e2eProjectDirectory": {
75
+ "type": "string",
76
+ "description": "A directory where the plugin E2E project is placed."
77
+ },
78
+ "standaloneConfig": {
79
+ "description": "Split the project configuration into `<projectRoot>/project.json` rather than including it inside `workspace.json`.",
80
+ "type": "boolean",
81
+ "default": true,
82
+ "x-deprecated": "Nx only supports standaloneConfig"
83
+ },
84
+ "setParserOptionsProject": {
85
+ "type": "boolean",
86
+ "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.",
87
+ "default": false
88
+ },
89
+ "compiler": {
90
+ "type": "string",
91
+ "enum": ["tsc", "swc"],
92
+ "default": "tsc",
93
+ "description": "The compiler used by the build and test targets."
94
+ },
95
+ "publishable": {
96
+ "type": "boolean",
97
+ "description": "Generates a boilerplate for publishing the plugin to npm.",
98
+ "default": false
99
+ },
100
+ "useProjectJson": {
101
+ "type": "boolean",
102
+ "description": "Use a `project.json` configuration file instead of inlining the Nx configuration in the `package.json` file."
103
+ }
23
104
  },
24
- "name": {
25
- "type": "string",
26
- "description": "Plugin name",
27
- "x-priority": "important"
28
- },
29
- "importPath": {
30
- "type": "string",
31
- "description": "How the plugin will be published, like `@myorg/my-awesome-plugin`. Note this must be a valid NPM name.",
32
- "x-priority": "important"
33
- },
34
- "linter": {
35
- "description": "The tool to use for running lint checks.",
36
- "type": "string",
37
- "enum": ["none", "eslint"],
38
- "x-priority": "important"
39
- },
40
- "unitTestRunner": {
41
- "description": "Test runner to use for unit tests.",
42
- "type": "string",
43
- "enum": ["none", "jest", "vitest"],
44
- "x-priority": "important"
45
- },
46
- "tags": {
47
- "type": "string",
48
- "description": "Add tags to the library (used for linting).",
49
- "alias": "t"
50
- },
51
- "skipFormat": {
52
- "description": "Skip formatting files.",
53
- "type": "boolean",
54
- "default": false,
55
- "x-priority": "internal"
56
- },
57
- "skipTsConfig": {
58
- "type": "boolean",
59
- "default": false,
60
- "description": "Do not update tsconfig.json for development experience.",
61
- "x-priority": "internal"
62
- },
63
- "skipLintChecks": {
64
- "type": "boolean",
65
- "default": false,
66
- "description": "Do not eslint configuration for plugin json files."
67
- },
68
- "e2eTestRunner": {
69
- "type": "string",
70
- "enum": ["jest", "none"],
71
- "description": "Test runner to use for end to end (E2E) tests.",
72
- "default": "none"
73
- },
74
- "e2eProjectDirectory": {
75
- "type": "string",
76
- "description": "A directory where the plugin E2E project is placed."
77
- },
78
- "standaloneConfig": {
79
- "description": "Split the project configuration into `<projectRoot>/project.json` rather than including it inside `workspace.json`.",
80
- "type": "boolean",
81
- "default": true,
82
- "x-deprecated": "Nx only supports standaloneConfig"
83
- },
84
- "setParserOptionsProject": {
85
- "type": "boolean",
86
- "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.",
87
- "default": false
88
- },
89
- "compiler": {
90
- "type": "string",
91
- "enum": ["tsc", "swc"],
92
- "default": "tsc",
93
- "description": "The compiler used by the build and test targets."
94
- },
95
- "publishable": {
96
- "type": "boolean",
97
- "description": "Generates a boilerplate for publishing the plugin to npm.",
98
- "default": false
99
- },
100
- "useProjectJson": {
101
- "type": "boolean",
102
- "description": "Use a `project.json` configuration file instead of inlining the Nx configuration in the `package.json` file."
103
- }
104
- },
105
- "required": ["directory"]
105
+ "required": ["directory"]
106
106
  }
@@ -1,34 +1,34 @@
1
1
  {
2
- "$schema": "https://json-schema.org/schema",
3
- "cli": "nx",
4
- "$id": "NxPluginPreset",
5
- "title": "Generator ran by create-nx-plugin",
6
- "description": "Initializes a workspace with an nx-plugin inside of it. Use as: `create-nx-plugin` or `create-nx-workspace --preset @nx/nx-plugin`.",
7
- "examples": [
8
- {
9
- "command": "npx create-nx-plugin",
10
- "description": "Creates a new Nx workspace containing an Nx plugin."
2
+ "$schema": "https://json-schema.org/schema",
3
+ "cli": "nx",
4
+ "$id": "NxPluginPreset",
5
+ "title": "Generator ran by create-nx-plugin",
6
+ "description": "Initializes a workspace with an nx-plugin inside of it. Use as: `create-nx-plugin` or `create-nx-workspace --preset @nx/nx-plugin`.",
7
+ "examples": [
8
+ {
9
+ "command": "npx create-nx-plugin",
10
+ "description": "Creates a new Nx workspace containing an Nx plugin."
11
+ },
12
+ {
13
+ "command": "npx create-nx-workspace --preset @nx/plugin",
14
+ "description": "Creates a new Nx workspace containing an Nx plugin."
15
+ }
16
+ ],
17
+ "type": "object",
18
+ "properties": {
19
+ "pluginName": {
20
+ "type": "string",
21
+ "description": "Plugin name",
22
+ "aliases": ["name"]
23
+ },
24
+ "createPackageName": {
25
+ "type": "string",
26
+ "description": "Name of package which creates a workspace"
27
+ },
28
+ "useProjectJson": {
29
+ "type": "boolean",
30
+ "description": "Use a `project.json` configuration file instead of inlining the Nx configuration in the `package.json` file."
31
+ }
11
32
  },
12
- {
13
- "command": "npx create-nx-workspace --preset @nx/plugin",
14
- "description": "Creates a new Nx workspace containing an Nx plugin."
15
- }
16
- ],
17
- "type": "object",
18
- "properties": {
19
- "pluginName": {
20
- "type": "string",
21
- "description": "Plugin name",
22
- "aliases": ["name"]
23
- },
24
- "createPackageName": {
25
- "type": "string",
26
- "description": "Name of package which creates a workspace"
27
- },
28
- "useProjectJson": {
29
- "type": "boolean",
30
- "description": "Use a `project.json` configuration file instead of inlining the Nx configuration in the `package.json` file."
31
- }
32
- },
33
- "required": ["pluginName"]
33
+ "required": ["pluginName"]
34
34
  }