mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
This commits adds an action to update the Angular CLI help contents that are used by AIO to generate CLI guides. This also changes the setup to include the files are source files instead of having to clone the repository each time. This also simplifies the PR review process of the PR opened by the action. PR Close #48577
54 lines
No EOL
3.1 KiB
JSON
54 lines
No EOL
3.1 KiB
JSON
{
|
|
"name": "cache",
|
|
"command": "ng cache",
|
|
"shortDescription": "Configure persistent disk cache and retrieve cache statistics.",
|
|
"longDescriptionRelativePath": "@angular/cli/src/commands/cache/long-description.md",
|
|
"longDescription": "Angular CLI saves a number of cachable operations on disk by default.\n\nWhen you re-run the same build, the build system restores the state of the previous build and re-uses previously performed operations, which decreases the time taken to build and test your applications and libraries.\n\nTo amend the default cache settings, add the `cli.cache` object to your [Workspace Configuration](guide/workspace-config).\nThe object goes under `cli.cache` at the top level of the file, outside the `projects` sections.\n\n```jsonc\n{\n \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n \"version\": 1,\n \"cli\": {\n \"cache\": {\n // ...\n }\n },\n \"projects\": {}\n}\n```\n\nFor more information, see [cache options](guide/workspace-config#cache-options).\n\n### Cache environments\n\nBy default, disk cache is only enabled for local environments. The value of environment can be one of the following:\n\n- `all` - allows disk cache on all machines.\n- `local` - allows disk cache only on development machines.\n- `ci` - allows disk cache only on continuous integration (CI) systems.\n\nTo change the environment setting to `all`, run the following command:\n\n```bash\nng config cli.cache.environment all\n```\n\nFor more information, see `environment` in [cache options](guide/workspace-config#cache-options).\n\n<div class=\"alert is-helpful\">\n\nThe Angular CLI checks for the presence and value of the `CI` environment variable to determine in which environment it is running.\n\n</div>\n\n### Cache path\n\nBy default, `.angular/cache` is used as a base directory to store cache results.\n\nTo change this path to `.cache/ng`, run the following command:\n\n```bash\nng config cli.cache.path \".cache/ng\"\n```\n",
|
|
"aliases": [],
|
|
"deprecated": false,
|
|
"options": [
|
|
{
|
|
"name": "help",
|
|
"type": "boolean",
|
|
"description": "Shows a help message for this command in the console."
|
|
}
|
|
],
|
|
"subcommands": [
|
|
{
|
|
"name": "clean",
|
|
"command": "clean",
|
|
"shortDescription": "Deletes persistent disk cache from disk.",
|
|
"options": [],
|
|
"aliases": [],
|
|
"deprecated": false
|
|
},
|
|
{
|
|
"name": "disable",
|
|
"command": "disable",
|
|
"shortDescription": "Disables persistent disk cache for all projects in the workspace.",
|
|
"options": [],
|
|
"aliases": [
|
|
"off"
|
|
],
|
|
"deprecated": false
|
|
},
|
|
{
|
|
"name": "enable",
|
|
"command": "enable",
|
|
"shortDescription": "Enables disk cache for all projects in the workspace.",
|
|
"options": [],
|
|
"aliases": [
|
|
"on"
|
|
],
|
|
"deprecated": false
|
|
},
|
|
{
|
|
"name": "info",
|
|
"command": "info",
|
|
"shortDescription": "Prints persistent disk cache configuration and statistics in the console.",
|
|
"options": [],
|
|
"aliases": [],
|
|
"deprecated": false
|
|
}
|
|
]
|
|
} |