Plugins
Nx Plugin
Plugin for building custom Forge plugins
@bjb-forge/nx-plugin-project
Installation
npx forge add @bjb-forge/nx-plugin-projectPlugin Options
{
"plugin": "@bjb-forge/nx-plugin-project/nx-plugin",
"options": {}
}| Option | Type | Description |
|---|---|---|
build.targetName | string | The name of the build target |
lint.targetName | string | The name of the lint target |
test.targetName | string | The name of the test target |
Inferred Targets
build
Compiles the Nx plugin package using TypeScript.
Condition: Nx plugin projects matching **/nx-*-project/package.json
lint
Runs ESLint to check code quality.
Condition: Nx plugin projects matching **/nx-*-project/package.json
test
Runs unit tests using Jest.
Condition: Nx plugin projects matching **/nx-*-project/package.json
sync
Runs sync generators for version reset, CLI package group, and plugin documentation.
Condition: Nx plugin projects matching **/nx-*-project/package.json
Generators
inferred-config
Configure plugin to support inferred configuration
nx g @bjb-forge/nx-plugin-project:inferred-config [options]| Option | Type | Required | Default | Description |
|---|---|---|---|---|
directory | string | Yes | - | A directory of the plugin project. |
init-generator
Configure plugin with an init generator
nx g @bjb-forge/nx-plugin-project:init-generator [options]| Option | Type | Required | Default | Description |
|---|---|---|---|---|
directory | string | Yes | - | A directory of the plugin project. |
plugin-project
Create an Nx Plugin for JB.
nx g @bjb-forge/nx-plugin-project:plugin-project [options]| Option | Type | Required | Default | Description |
|---|---|---|---|---|
directory | string | Yes | - | A directory where the plugin is placed. |
scope | string | No | forge | Import Path Scope |
withE2eProject | boolean | No | true | Generate also en e2e project for the plugin |
withInitGenerator | boolean | No | true | Generate also an init generator |