2024-01-30 16:29:05 -05:00

83 lines
3.5 KiB
JSON

{
"name": "executor",
"factory": "./src/generators/executor/executor#executorGeneratorInternal",
"schema": {
"$schema": "https://json-schema.org/schema",
"cli": "nx",
"$id": "NxPluginExecutor",
"title": "Create an Executor for an Nx Plugin",
"description": "Create an Executor for an Nx Plugin.",
"examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Basic executor\" %}\n\nCreate a new executor called `build` inside the plugin `my-plugin`:\n\n```bash\nnx g @nx/plugin:executor build --project my-plugin\n```\n\n{% /tab %}\n{% tab label=\"With custom hashing\" %}\n\nCreate a new executor called `build` inside the plugin `my-plugin`, that uses a custom hashing function:\n\n```bash\nnx g @nx/plugin:executor build --project my-plugin --includeHasher\n```\n\n{% /tab %}\n{% /tabs %}\n",
"type": "object",
"examples": [
{
"command": "nx g executor my-executor --project=my-plugin",
"description": "Generate `libs/my-plugin/src/executors/my-executor`"
}
],
"properties": {
"name": {
"type": "string",
"description": "Executor name.",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What name would you like to use for the executor?",
"x-priority": "important"
},
"directory": {
"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"],
"x-priority": "important"
},
"description": {
"type": "string",
"description": "Executor description.",
"x-priority": "important"
},
"unitTestRunner": {
"type": "string",
"enum": ["jest", "none"],
"description": "Test runner to use for unit tests.",
"default": "jest"
},
"includeHasher": {
"type": "boolean",
"default": false,
"description": "Should the boilerplate for a custom hasher be generated?"
},
"skipLintChecks": {
"type": "boolean",
"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"]
},
"project": {
"type": "string",
"description": "The name of the project.",
"alias": "p",
"$default": { "$source": "projectName" },
"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 v19."
},
"skipFormat": {
"type": "boolean",
"description": "Skip formatting files.",
"default": false,
"x-priority": "internal"
}
},
"required": ["name"],
"additionalProperties": false,
"presets": []
},
"description": "Create an executor for an Nx Plugin.",
"implementation": "/packages/plugin/src/generators/executor/executor#executorGeneratorInternal.ts",
"aliases": [],
"hidden": false,
"path": "/packages/plugin/src/generators/executor/schema.json",
"type": "generator"
}