ng analytics
配置 Angular CLI 使用情况度量的收集策略。参见 https://angular.cn/cli/usage-analytics-gathering。
Configures the gathering of Angular CLI usage metrics. See https://angular.io/cli/usage-analytics-gathering.
ng analytics <setting-or-project> <project-setting> [options]
说明
settingOrProject 取以下值之一。
The value of settingOrProject is one of the following.
"on":启用此用户的分析收集和上报功能。
"on" : Enables analytics gathering and reporting for the user.
"off":禁用此用户的分析收集和上报功能。
"off" : Disables analytics gathering and reporting for the user.
"ci":启用分析并为持续集成环境配置上报功能,这通常会使用一个普通 CI 用户。
"ci" : Enables analytics and configures reporting for use with Continuous Integration, which uses a common CI user.
"prompt":提示用户交互式的设置此状态。
"prompt" : Prompts the user to set the status interactively.
"project":将项目的默认状态设置为 projectSetting 的值,该值可以是任何其他值。对于 settingOrProject 的所有其他值,该 projectSetting 参数会被忽略。
"project" : Sets the default status for the project to the projectSetting value, which can be any of the other values. The projectSetting argument is ignored for all other values of settingOrProject.
参数
参数 | 说明 | Value Type |
---|---|---|
<setting-or-project> | 直接启用或禁用当前用户的所有使用情况分析,或交互式的提示用户进行设置,或设置项目的默认状态。 Directly enables or disables all usage analytics for the user, or prompts the user to set the status interactively, or sets the default status for the project. | on|off|ci|project|prompt |
<project-setting> | 为本项目设置使用情况分析的默认启用状态。 Sets the default analytics enablement status for the project. | on|off|prompt |
选项
选项 | 说明 | Value Type | Default Value |
---|---|---|---|
--help | 在控制台显示关于本命令的帮助信息。 Shows a help message for this command in the console. | true|false|json|JSON | false |