{ "githubRoot": "https://github.com/nrwl/nx/blob/master", "name": "node", "description": "Node Plugin for Nx", "root": "/packages/node", "source": "/packages/node/src", "generators": [ { "name": "init", "factory": "./src/generators/init/init", "schema": { "$schema": "http://json-schema.org/schema", "cli": "nx", "$id": "NxNodeInit", "title": "Init Node Plugin", "description": "Init Node Plugin.", "type": "object", "properties": { "unitTestRunner": { "description": "Adds the specified unit test runner.", "type": "string", "enum": ["jest", "none"], "default": "jest" }, "skipFormat": { "description": "Skip formatting files.", "type": "boolean", "default": false } }, "required": [], "presets": [] }, "description": "Initialize the @nrwl/node plugin", "aliases": ["ng-add"], "hidden": true, "implementation": "/packages/node/src/generators/init/init.ts", "path": "/packages/node/src/generators/init/schema.json" }, { "name": "application", "factory": "./src/generators/application/application", "schema": { "$schema": "http://json-schema.org/schema", "cli": "nx", "$id": "SchematicsNxNodeApp", "title": "Nx Application Options Schema", "description": "Nx Application Options Schema.", "type": "object", "properties": { "name": { "description": "The name of the application.", "type": "string", "$default": { "$source": "argv", "index": 0 }, "x-prompt": "What name would you like to use for the node application?" }, "directory": { "description": "The directory of the new application.", "type": "string" }, "skipFormat": { "description": "Skip formatting files", "type": "boolean", "default": false }, "skipPackageJson": { "type": "boolean", "default": false, "description": "Do not add dependencies to `package.json`." }, "linter": { "description": "The tool to use for running lint checks.", "type": "string", "enum": ["eslint", "tslint"], "default": "eslint" }, "unitTestRunner": { "type": "string", "enum": ["jest", "none"], "description": "Test runner to use for unit tests.", "default": "jest" }, "tags": { "type": "string", "description": "Add tags to the application (used for linting)." }, "frontendProject": { "type": "string", "description": "Frontend project that needs to access this application. This sets up proxy configuration." }, "babelJest": { "type": "boolean", "description": "Use `babel` instead of `ts-jest`.", "default": false }, "pascalCaseFiles": { "type": "boolean", "description": "Use pascal case file names.", "alias": "P", "default": false }, "js": { "type": "boolean", "description": "Generate JavaScript files rather than TypeScript files.", "default": false }, "setParserOptionsProject": { "type": "boolean", "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.", "default": false }, "standaloneConfig": { "description": "Split the project configuration into `/project.json` rather than including it inside `workspace.json`.", "type": "boolean" } }, "required": [], "presets": [] }, "aliases": ["app"], "x-type": "application", "description": "Create a node application", "implementation": "/packages/node/src/generators/application/application.ts", "hidden": false, "path": "/packages/node/src/generators/application/schema.json" }, { "name": "library", "factory": "./src/generators/library/library", "schema": { "$schema": "http://json-schema.org/schema", "cli": "nx", "$id": "NxNodeLibrary", "title": "Create a Node Library for Nx", "description": "Create a Node Library for an Nx workspace.", "type": "object", "examples": [ { "command": "nx g lib mylib --directory=myapp", "description": "Generate `libs/myapp/mylib`" } ], "properties": { "name": { "type": "string", "description": "Library name", "$default": { "$source": "argv", "index": 0 }, "x-prompt": "What name would you like to use for the library?" }, "directory": { "type": "string", "description": "A directory where the lib is placed", "alias": "dir" }, "simpleModuleName": { "description": "Keep the module name simple (when using `--directory`).", "type": "boolean", "default": false }, "linter": { "description": "The tool to use for running lint checks.", "type": "string", "enum": ["eslint", "tslint"], "default": "eslint" }, "unitTestRunner": { "type": "string", "enum": ["jest", "none"], "description": "Test runner to use for unit tests.", "default": "jest" }, "tags": { "type": "string", "description": "Add tags to the library (used for linting).", "alias": "t" }, "skipFormat": { "description": "Skip formatting files.", "type": "boolean", "default": false }, "skipTsConfig": { "type": "boolean", "default": false, "description": "Do not update `tsconfig.base.json` for development experience." }, "publishable": { "type": "boolean", "description": "Create a publishable library." }, "buildable": { "type": "boolean", "default": false, "description": "Generate a buildable library." }, "compiler": { "type": "string", "enum": ["tsc", "swc"], "default": "tsc", "description": "The compiler used by the build and test targets." }, "importPath": { "type": "string", "description": "The library name used to import it, like `@myorg/my-awesome-lib`. Must be a valid npm name." }, "rootDir": { "type": "string", "alias": "srcRootForCompilationRoot", "description": "Sets the `rootDir` for TypeScript compilation. When not defined, it uses the project's root property, or `srcRootForCompilationRoot` if it is defined." }, "testEnvironment": { "type": "string", "enum": ["jsdom", "node"], "description": "The test environment to use if `unitTestRunner` is set to `jest`.", "default": "jsdom" }, "babelJest": { "type": "boolean", "description": "Use `babel` instead of `ts-jest`.", "default": false }, "pascalCaseFiles": { "type": "boolean", "description": "Use pascal case file names.", "alias": "P", "default": false }, "js": { "type": "boolean", "description": "Generate JavaScript files rather than TypeScript files.", "default": false }, "strict": { "type": "boolean", "description": "Whether to enable tsconfig strict mode or not.", "default": false }, "standaloneConfig": { "description": "Split the project configuration into `/project.json` rather than including it inside `workspace.json`.", "type": "boolean" }, "setParserOptionsProject": { "type": "boolean", "description": "Whether or not to configure the ESLint `parserOptions.project`. We do not do this by default for lint performance reasons.", "default": false } }, "required": ["name"], "presets": [] }, "aliases": ["lib"], "x-type": "library", "description": "Create a library", "implementation": "/packages/node/src/generators/library/library.ts", "hidden": false, "path": "/packages/node/src/generators/library/schema.json" } ], "executors": [ { "name": "webpack", "implementation": "/packages/node/src/executors/webpack/webpack.impl.ts", "schema": { "title": "Node Application Build Target", "description": "Node application build target options for Build Facade.", "cli": "nx", "type": "object", "properties": { "main": { "type": "string", "description": "The name of the main entry-point file." }, "tsConfig": { "type": "string", "description": "The name of the Typescript configuration file." }, "outputPath": { "type": "string", "description": "The output path of the generated files." }, "watch": { "type": "boolean", "description": "Run build when files change.", "default": false }, "poll": { "type": "number", "description": "Frequency of file watcher in ms." }, "sourceMap": { "type": "boolean", "description": "Produce source maps.", "default": true }, "progress": { "type": "boolean", "description": "Log progress to the console while building.", "default": false }, "assets": { "type": "array", "description": "List of static application assets.", "default": [], "items": { "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." } }, "additionalProperties": false, "required": ["glob", "input", "output"] }, { "type": "string" } ] } }, "externalDependencies": { "oneOf": [ { "type": "string", "enum": ["none", "all"] }, { "type": "array", "items": { "type": "string" } } ], "description": "Dependencies to keep external to the bundle. (`all` (default), `none`, or an array of module names)", "default": "all" }, "statsJson": { "type": "boolean", "description": "Generates a `stats.json` file which can be analyzed using tools such as: `webpack-bundle-analyzer` or ``.", "default": false }, "verbose": { "type": "boolean", "description": "Emits verbose output", "default": false }, "extractLicenses": { "type": "boolean", "description": "Extract all licenses in a separate file, in the case of production builds only.", "default": false }, "optimization": { "type": "boolean", "description": "Defines the optimization level of the build.", "default": false }, "maxWorkers": { "type": "number", "description": "Number of workers to use for type checking. (defaults to # of CPUS)" }, "memoryLimit": { "type": "number", "description": "Memory limit for type checking service process in MB. (defaults to `2048`)", "default": 2048 }, "fileReplacements": { "description": "Replace files with other files in the build.", "type": "array", "items": { "type": "object", "properties": { "replace": { "type": "string", "description": "The file to be replaced." }, "with": { "type": "string", "description": "The file to replace with." } }, "additionalProperties": false, "required": ["replace", "with"] }, "default": [] }, "webpackConfig": { "oneOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "string" } ], "description": "Path to a function which takes a webpack config, context and returns the resulting webpack config. See https://nx.dev/guides/customize-webpack" }, "buildLibsFromSource": { "type": "boolean", "description": "Read buildable libraries from source instead of building them separately.", "default": true }, "generatePackageJson": { "type": "boolean", "description": "Generates a `package.json` file with the project's `node_module` dependencies populated for installing in a container. If a `package.json` exists in the project's directory, it will be reused with dependencies populated.", "default": false }, "transformers": { "type": "array", "description": "List of TypeScript Compiler Transfomers Plugins.", "default": [], "aliases": ["tsPlugins"], "items": { "oneOf": [ { "type": "string" }, { "type": "object", "properties": { "name": { "type": "string" }, "options": { "type": "object", "additionalProperties": true } }, "additionalProperties": false, "required": ["name"] } ] } }, "additionalEntryPoints": { "type": "array", "items": { "type": "object", "properties": { "entryName": { "type": "string", "description": "Name of the additional entry file." }, "entryPath": { "type": "string", "description": "Path to the additional entry file." } } } }, "outputFileName": { "type": "string", "description": "Name of the main output file. (defaults to `main.js`)", "default": "main.js" } }, "required": ["tsConfig", "main"], "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." } }, "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"] } ] } }, "presets": [] }, "description": "Build a Node application using webpack", "aliases": [], "hidden": false, "path": "/packages/node/src/executors/webpack/schema.json" }, { "name": "node", "implementation": "/packages/node/src/executors/node/node.impl.ts", "schema": { "$schema": "http://json-schema.org/schema", "cli": "nx", "title": "Node executor", "description": "Execute Nodejs applications.", "type": "object", "properties": { "buildTarget": { "type": "string", "description": "The target to run to build you the app." }, "buildTargetOptions": { "type": "object", "description": "Additional options to pass into the build target.", "default": {} }, "waitUntilTargets": { "type": "array", "description": "The targets to run to before starting the node app.", "default": [], "items": { "type": "string" } }, "host": { "type": "string", "default": "localhost", "description": "The host to inspect the process on." }, "port": { "type": "number", "default": 9229, "description": "The port to inspect the process on. Setting port to 0 will assign random free ports to all forked processes." }, "inspect": { "oneOf": [ { "type": "string", "enum": ["inspect", "inspect-brk"] }, { "type": "boolean" } ], "description": "Ensures the app is starting with debugging.", "default": "inspect" }, "runtimeArgs": { "type": "array", "description": "Extra args passed to the node process.", "default": [], "items": { "type": "string" } }, "args": { "type": "array", "description": "Extra args when starting the app.", "default": [], "items": { "type": "string" } }, "watch": { "type": "boolean", "description": "Enable re-building when files change.", "default": true } }, "additionalProperties": false, "required": ["buildTarget"], "presets": [] }, "description": "Execute a Node application", "aliases": [], "hidden": false, "path": "/packages/node/src/executors/node/schema.json" } ] }