Plugins
JavaScript / TypeScript
Plugin for JavaScript and TypeScript projects
@bjb-forge/nx-js-project
Installation
npx @bjb-forge/cli add @bjb-forge/nx-js-projectPlugin Options
{
"plugin": "@bjb-forge/nx-js-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 TypeScript files using tsc.
Condition: All JavaScript/TypeScript projects with a package.json
lint
Runs ESLint to check code quality.
Condition: All JavaScript/TypeScript projects with a package.json
test
Runs unit tests using Jest.
Condition: All JavaScript/TypeScript projects with a package.json
Generators
js-project
Create a JavaScript/TypeScript project.
nx g @bjb-forge/nx-js-project:js-project [options]| Option | Type | Required | Default | Description |
|---|---|---|---|---|
directory | string | Yes | - | A directory where the project is placed |
scope | string | No | forge | Import path scope |
nx g @bjb-forge/nx-js-project:js-project packages/my-lib --scope=org