UNPKG

@nx/js

Version:

The JS plugin for Nx contains executors and generators that provide the best experience for developing JavaScript and TypeScript projects.

161 lines (160 loc) 5.32 kB
{ "version": 2, "outputCapture": "direct-nodejs", "title": "Typescript Build Target", "description": "Builds using TypeScript.", "cli": "nx", "type": "object", "properties": { "main": { "type": "string", "description": "The name of the main entry-point file.", "x-completion-type": "file", "x-completion-glob": "main@(.js|.ts|.jsx|.tsx)", "x-priority": "important" }, "generateExportsField": { "type": "boolean", "alias": "exports", "description": "Update the output package.json file's 'exports' field. This field is used by Node and bundlers. Ignored when `generatePackageJson` is set to `false`.", "default": false, "x-priority": "important" }, "additionalEntryPoints": { "type": "array", "description": "Additional entry-points to add to exports field in the package.json file. Ignored when `generatePackageJson` is set to `false`.", "items": { "type": "string" }, "x-priority": "important" }, "rootDir": { "type": "string", "description": "Sets the rootDir for TypeScript compilation. When not defined, it uses the root of project." }, "outputPath": { "type": "string", "description": "The output path of the generated files.", "x-completion-type": "directory", "x-priority": "important" }, "outputFileName": { "type": "string", "description": "The path to the main file relative to the outputPath", "x-completion-type": "file" }, "tsConfig": { "type": "string", "description": "The path to the Typescript configuration file.", "x-completion-type": "file", "x-completion-glob": "tsconfig.*.json", "x-priority": "important" }, "assets": { "type": "array", "description": "List of static assets.", "default": [], "items": { "$ref": "#/definitions/assetPattern" } }, "watch": { "type": "boolean", "description": "Enable re-building when files change.", "default": false }, "clean": { "type": "boolean", "description": "Remove previous output before build.", "default": true }, "transformers": { "type": "array", "description": "List of TypeScript Transformer Plugins.", "default": [], "items": { "$ref": "#/definitions/transformerPattern" }, "x-priority": "important" }, "generateLockfile": { "type": "boolean", "description": "Generate a lockfile (e.g. package-lock.json) that matches the workspace lockfile to ensure package versions match. Ignored when `generatePackageJson` is set to `false`.", "default": false, "x-priority": "internal" }, "generatePackageJson": { "type": "boolean", "description": "Generate package.json file in the output folder.", "default": true }, "includeIgnoredAssetFiles": { "type": "boolean", "description": "Include files that are ignored by .gitignore and .nxignore when copying assets. WARNING: Ignored files are not automatically considered when calculating the task hash. To ensure Nx tracks these files for caching, add them to your target's inputs using 'dependentTasksOutputs' or 'runtime' configuration.", "default": false } }, "required": ["main", "outputPath", "tsConfig"], "definitions": { "assetPattern": { "oneOf": [ { "type": "object", "properties": { "glob": { "type": "string", "description": "The pattern to match." }, "input": { "type": "string", "description": "The input directory path in which to apply 'glob'. Defaults to the project root." }, "ignore": { "description": "An array of globs to ignore.", "type": "array", "items": { "type": "string" } }, "output": { "type": "string", "description": "Absolute path within the output." }, "includeIgnoredFiles": { "type": "boolean", "description": "Include files that are ignored by .gitignore and .nxignore for this specific asset pattern. WARNING: Ignored files are not automatically considered when calculating the task hash. To ensure Nx tracks these files for caching, add them to your target's inputs using 'dependentTasksOutputs' or 'runtime' configuration.", "default": false } }, "additionalProperties": false, "required": ["glob", "input", "output"] }, { "type": "string" } ] }, "transformerPattern": { "oneOf": [ { "type": "string" }, { "type": "object", "properties": { "name": { "type": "string" }, "options": { "type": "object", "additionalProperties": true } }, "additionalProperties": false, "required": ["name"] } ] } }, "examplesFile": "../../../docs/tsc-examples.md" }