Plugins
Nx Plugin
Plugin for building custom Forge plugins
@bjb-forge/nx-plugin-project
Installation
npx @bjb-forge/cli 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
Generators
plugin-project
Create a custom Forge plugin.
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 an e2e project for the plugin |
withInitGenerator | boolean | No | true | Generate an init generator |
inferred-config
Add inferred configuration support to a plugin.
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
Add an init generator to a plugin.
nx g @bjb-forge/nx-plugin-project:init-generator [options]| Option | Type | Required | Default | Description |
|---|---|---|---|---|
directory | string | Yes | - | A directory of the plugin project |