-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs(nx-plugin): document local plugin functionality #9564
docs(nx-plugin): document local plugin functionality #9564
Conversation
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 44b29d6. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch Sent with 💌 from NxCloud. |
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/nrwl/nx-dev/8GRFaJGGKM1abxxJ9Zdwegxrsrp2 |
The documentation so far looks good, but you don't describe how to use the executors in your plugin |
c505e13
to
a32bb4f
Compare
docs/shared/devkit-and-nx-plugins.md
Outdated
@@ -42,6 +42,10 @@ executors. | |||
|
|||
The Nx team maintains a core set of plugins for many application and tooling frameworks. You can write [custom generators](/generators/workspace-generators) and [executors](/executors/creating-custom-builders) for your own workspace. You can also write your own plugin and share it with the community. The [Nx Plugin](/nx-plugin/overview) plugin provides guidance on how you can build your own custom plugins. | |||
|
|||
### Local workspace plugins | |||
|
|||
Nx plugins can also be used in the workspace they are generated inside of. For example, if you generate a plugin with `nx g @nrwl/nx-plugin workspace --importPath workspace`, you will be able to immediately make use of generators and executors within it. This would look like `nx g workspace:lib` for generators or `"executor": "workspace:build"` for executors. If you are only planning on making use of generators, Nx provides workspace generators which can be used rather than whole plugins. Generating a full plugin allows you to take advantage of all of the capabilities above, including project inference and graph extension, which is not possible when solely using workspace generators. Additionally, your local plugin could be set as the default collection in `nx.json`, such that running `nx g lib` would call your workspace plugin's lib generator. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would have the example be
nx g @nrwl/nx-plugin myPlugin --importPath @my-org/myPlugin
At first I thought that workspace
was a key word of some kind.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, that makes sense. I'll update it.
a32bb4f
to
44b29d6
Compare
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
Current Behavior
Expected Behavior
Related Issue(s)
Fixes #