docs(misc): improve local executors guide (#22396)

This commit is contained in:
Leosvel Pérez Espinosa 2024-03-20 14:20:43 +01:00 committed by GitHub
parent a00f6438b9
commit c076eab950
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -16,7 +16,7 @@ nx g @nx/plugin:plugin my-plugin
Use the Nx CLI to generate the initial files needed for your executor.
```shell
nx generate @nx/plugin:executor echo --project=my-plugin
nx generate @nx/plugin:executor echo --directory=libs/my-plugin/src/executors/echo
```
After the command is finished, the executor is created in the plugin `executors` folder.
@ -94,19 +94,11 @@ export default async function echoExecutor(
Our last step is to add this executor to a given projects `targets` object in your project's `project.json` file:
```jsonc {% fileName="project.json" %}
```jsonc {% fileName="project.json" highlightLines=["5-10"] %}
{
//...
"targets": {
"build": {
// ...
},
"serve": {
// ...
},
"lint": {
// ,,,
},
// ...
"echo": {
"executor": "@my-org/my-plugin:echo",
"options": {