<!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> <!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. --> ## Current Behavior Some plugin docs don't make sense after project name and root changes ## Expected Behavior They've been touched up ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #25191
986 B
986 B
Workspace Executors
In Nx 13.10+, local nx plugins can contain executors that are used in the workspace. When creating a custom executor for your workspace, look into the local executor guide to simplify the build process.
Converting workspace executors to local executors
- If you don't already have a local plugin, use Nx to generate one:
npm add -D @nx/plugin
nx g @nx/plugin:plugin my-plugin --directory=tools/my-plugin
- Use the Nx CLI to generate the initial files needed for your executor. Replace
my-executorwith the name of your workspace executor.
nx generate @nx/plugin:executor my-executor --directory=tools/my-plugin/src/executors/my-executor
-
Copy the code for your workspace executor into the newly created executor's folder. e.g.
libs/my-plugin/src/executors/my-executor/ -
Now you can reference the executor like this:
{
"executor": "@my-org/my-plugin:my-executor"
}