@nx/plugin:plugin
Create a Plugin for Nx.
Monorepo World: October 7, 2024Monorepo World: October 7, 2024Join us!
Create a Plugin for Nx.
1nx generate plugin ...
2By default, Nx will search for plugin in the default collection provisioned in workspace.json.
You can specify the collection explicitly as follows:
1nx g @nx/plugin:plugin ...
2Show what will be generated without writing to disk:
1nx g plugin ... --dry-run
2Generates an Nx plugin project called plugins-my-plugin at libs/plugins/my-plugin. The project will have an npm package name and import path of @myorg/my-plugin.:
1nx g plugin my-plugin --directory=plugins --importPath=@myorg/my-plugin
2(?:^@[a-zA-Z0-9-*~][a-zA-Z0-9-*._~]*\\/[a-zA-Z0-9-~][a-zA-Z0-9-._~]*|^[a-zA-Z][^:]*)$Plugin name
How the plugin will be published, like @myorg/my-awesome-plugin. Note this must be a valid NPM name.
tsctsc, swcThe compiler used by the build and test targets.
A directory where the plugin is placed.
nonejest, noneTest runner to use for end to end (E2E) tests.
eslinteslintThe tool to use for running lint checks.
as-provided, derivedWhether to generate the project name and root directory as provided (as-provided) or generate them composing their values and taking the configured layout into account (derived).
falseGenerates a boilerplate for publishing the plugin to npm.
falseDo not eslint configuration for plugin json files.
falseWhether or not to configure the ESLint parserOptions.project option. We do not do this by default for lint performance reasons.
Add tags to the library (used for linting).
jestjest, noneTest runner to use for unit tests.
falseSkip formatting files.
falseDo not update tsconfig.json for development experience.
trueSplit the project configuration into <projectRoot>/project.json rather than including it inside workspace.json.
Nx only supports standaloneConfig
Join us live for exciting talks on developer tooling and monorepos! Catch the action on YouTube and join the conversation on Discord!