In order to use your plugin in other workspaces or share it with the community, you will need to publish it to an npm registry. To publish your plugin follow these steps:
nx nx-release-publish nx-cfonts- Follow the prompts from npm.
- That's it!
After that, you can then install your plugin like any other Nx plugin -
nx add nx-cfontsList your Nx Plugin
Section titled “List your Nx Plugin”Nx provides a utility (nx list) that lists both core and community plugins. You can submit your plugin to be added to this list, but it needs to meet a few criteria first:
- Run some kind of automated e2e tests in your repository
- Include
@nx/devkitas adependencyin the plugin'spackage.json - List a
repository.urlin the plugin'spackage.json
{ "repository": { "type": "git", "url": "https://github.com/nrwl/nx.git", "directory": "packages/web" }}Once those criteria are met, you can submit your plugin by following the steps below:
- Fork the Nx repo (if you haven't already)
- Update the
astro-docs/src/content/approved-community-plugins.jsonfile with a new entry for your plugin that includes name, url and description - Use the following commit message template:
chore(core): nx plugin submission [PLUGIN_NAME] - push your changes, and run
pnpm submit-plugin
The
pnpm submit-plugincommand automatically opens the GitHub pull request process with the correct template.
We will then verify the plugin, offer suggestions or merge the pull request!