nx/docs/generated/packages/rollup.json

311 lines
12 KiB
JSON

{
"githubRoot": "https://github.com/nrwl/nx/blob/master",
"name": "rollup",
"packageName": "@nrwl/rollup",
"description": "The Nx Plugin for Rollup contains executors and generators that support building applications using Rollup.",
"root": "/packages/rollup",
"source": "/packages/rollup/src",
"documentation": [],
"generators": [
{
"name": "init",
"factory": "./src/generators/init/init#rollupInitGenerator",
"schema": {
"$schema": "http://json-schema.org/schema",
"$id": "NxWebpackInit",
"cli": "nx",
"title": "Init Webpack Plugin",
"description": "Init Webpack Plugin.",
"type": "object",
"properties": {
"compiler": {
"type": "string",
"enum": ["babel", "swc", "tsc"],
"description": "The compiler to initialize for.",
"default": "babel"
},
"skipFormat": {
"description": "Skip formatting files.",
"type": "boolean",
"default": false
}
},
"required": [],
"presets": []
},
"description": "Initialize the `@nrwl/rollup` plugin.",
"aliases": ["ng-add"],
"hidden": true,
"implementation": "/packages/rollup/src/generators/init/init#rollupInitGenerator.ts",
"path": "/packages/rollup/src/generators/init/schema.json"
},
{
"name": "rollup-project",
"factory": "./src/generators/rollup-project/rollup-project#rollupProjectGenerator",
"schema": {
"$schema": "http://json-schema.org/schema",
"$id": "NxRollupProject",
"cli": "nx",
"title": "Add Rollup Configuration to a project",
"description": "Add Rollup Configuration to a project.",
"type": "object",
"properties": {
"project": {
"type": "string",
"description": "The name of the project.",
"$default": { "$source": "argv", "index": 0 },
"x-dropdown": "project",
"x-prompt": "What is the name of the project to set up a rollup for?"
},
"compiler": {
"type": "string",
"enum": ["babel", "swc", "tsc"],
"description": "The compiler to use to build source.",
"default": "babel"
},
"main": {
"type": "string",
"description": "Path relative to the workspace root for the main entry file. Defaults to '<projectRoot>/src/main.ts'.",
"alias": "entryFile"
},
"tsConfig": {
"type": "string",
"description": "Path relative to the workspace root for the tsconfig file to build with. Defaults to '<projectRoot>/tsconfig.app.json'."
},
"skipFormat": {
"description": "Skip formatting files.",
"type": "boolean",
"default": false
},
"skipPackageJson": {
"type": "boolean",
"default": false,
"description": "Do not add dependencies to `package.json`."
},
"importPath": {
"type": "string",
"description": "The library name used to import it, like `@myorg/my-awesome-lib`."
},
"external": {
"type": "array",
"description": "A list of external modules that will not be bundled (`react`, `react-dom`, etc.).",
"items": { "type": "string" }
},
"rollupConfig": {
"type": "string",
"description": "Path relative to workspace root to a custom rollup file that takes a config object and returns an updated config."
}
},
"required": [],
"presets": []
},
"description": "Add rollup configuration to a project.",
"hidden": true,
"implementation": "/packages/rollup/src/generators/rollup-project/rollup-project#rollupProjectGenerator.ts",
"aliases": [],
"path": "/packages/rollup/src/generators/rollup-project/schema.json"
}
],
"executors": [
{
"name": "rollup",
"implementation": "/packages/rollup/src/executors/rollup/rollup.impl.ts",
"schema": {
"title": "Web Library Rollup Target (Experimental)",
"description": "Packages a library for different web usages (`UMD`, `ESM`, `CJS`).",
"cli": "nx",
"type": "object",
"properties": {
"project": {
"type": "string",
"description": "The path to package.json file."
},
"main": {
"type": "string",
"description": "The path to the entry file, relative to project.",
"alias": "entryFile",
"x-completion-type": "file",
"x-completion-glob": "**/*@(.js|.ts)"
},
"outputPath": {
"type": "string",
"description": "The output path of the generated files.",
"x-completion-type": "directory"
},
"outputFileName": {
"type": "string",
"description": "Name of the main output file. Defaults same basename as 'main' file."
},
"deleteOutputPath": {
"type": "boolean",
"description": "Delete the output path before building.",
"default": true
},
"tsConfig": {
"type": "string",
"description": "The path to tsconfig file.",
"x-completion-type": "file",
"x-completion-glob": "tsconfig.*.json"
},
"format": {
"type": "array",
"description": "List of module formats to output. Defaults to matching format from tsconfig (e.g. CJS for CommonJS, and ESM otherwise).",
"alias": "f",
"items": { "type": "string", "enum": ["esm", "umd", "cjs"] }
},
"external": {
"type": "array",
"description": "A list of external modules that will not be bundled (`react`, `react-dom`, etc.).",
"items": { "type": "string" }
},
"watch": {
"type": "boolean",
"description": "Enable re-building when files change.",
"default": false
},
"updateBuildableProjectDepsInPackageJson": {
"type": "boolean",
"description": "Update buildable project dependencies in `package.json`.",
"default": true
},
"buildableProjectDepsInPackageJsonType": {
"type": "string",
"description": "When `updateBuildableProjectDepsInPackageJson` is `true`, this adds dependencies to either `peerDependencies` or `dependencies`.",
"enum": ["dependencies", "peerDependencies"],
"default": "peerDependencies"
},
"rollupConfig": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string",
"x-completion-type": "file",
"x-completion-glob": "rollup?(*)@(.js|.ts)"
}
},
{
"type": "string",
"x-completion-type": "file",
"x-completion-glob": "rollup?(*)@(.js|.ts)"
}
],
"description": "Path to a function which takes a rollup config and returns an updated rollup config."
},
"umdName": {
"type": "string",
"description": "The name of your module in `UMD` format. Defaulted to your project name."
},
"globals": {
"description": "A mapping of node modules to their `UMD` global names. Used by the `UMD` bundle.",
"type": "array",
"items": {
"type": "object",
"properties": {
"moduleId": {
"type": "string",
"description": "The node module to map from (e.g. `react-dom`)."
},
"global": {
"type": "string",
"description": "The global name to map to (e.g. `ReactDOM`)."
}
},
"additionalProperties": false,
"required": ["moduleId", "global"]
},
"default": []
},
"extractCss": {
"type": ["boolean", "string"],
"description": "CSS files will be extracted to the output folder. Alternatively custom filename can be provided (e.g. styles.css)",
"default": true
},
"assets": {
"type": "array",
"description": "List of static 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."
},
"output": {
"type": "string",
"description": "Relative path within the output folder."
}
},
"additionalProperties": false,
"required": ["glob", "input", "output"]
},
{ "type": "string" }
]
}
},
"compiler": {
"type": "string",
"enum": ["babel", "swc", "tsc"],
"default": "babel",
"description": "Which compiler to use."
},
"javascriptEnabled": {
"type": "boolean",
"description": "Sets `javascriptEnabled` option for less loader",
"default": false
},
"generateExportsField": {
"type": "boolean",
"description": "Generate package.json with 'exports' field. This field defines entry points in the package and is used by Node and the TypeScript compiler.",
"default": false
},
"skipTypeField": {
"type": "boolean",
"description": "Prevents 'type' field from being added to compiled package.json file. Only use this if you are having an issue with this field.",
"default": false
}
},
"required": ["tsConfig", "project", "main", "outputPath"],
"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."
},
"output": {
"type": "string",
"description": "Relative path within the output folder."
}
},
"additionalProperties": false,
"required": ["glob", "input", "output"]
},
{ "type": "string" }
]
}
},
"presets": []
},
"description": "Bundle a package using Rollup.",
"aliases": [],
"hidden": false,
"path": "/packages/rollup/src/executors/rollup/schema.json"
}
]
}