Forge
Plugins

JavaScript / TypeScript

Plugin for JavaScript and TypeScript projects

@bjb-forge/nx-js-project

Installation

npx @bjb-forge/cli add @bjb-forge/nx-js-project

Plugin Options

{
  "plugin": "@bjb-forge/nx-js-project/nx-plugin",
  "options": {}
}
OptionTypeDescription
build.targetNamestringThe name of the build target
lint.targetNamestringThe name of the lint target
test.targetNamestringThe 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]
OptionTypeRequiredDefaultDescription
directorystringYes-A directory where the project is placed
scopestringNoforgeImport path scope
nx g @bjb-forge/nx-js-project:js-project packages/my-lib --scope=org

On this page