Skip to content

Commit

Permalink
feat(@angular/cli): add disable/enable aliases for off/on `ng analyti…
Browse files Browse the repository at this point in the history
…cs` command

`ng analytics enable/disable`better aligns with `ng cache enable/disable` that will be available in the future.
  • Loading branch information
alan-agius4 authored and clydin committed Mar 15, 2022
1 parent 46a7be3 commit 7ab22ed
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/angular/cli/src/commands/analytics/settings/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,12 @@ abstract class AnalyticsSettingModule
abstract override run({ global }: Options<AnalyticsCommandArgs>): Promise<void>;
}

export class AnalyticsOffModule
export class AnalyticsDisableModule
extends AnalyticsSettingModule
implements CommandModuleImplementation<AnalyticsCommandArgs>
{
command = 'off';
command = 'disable';
aliases = 'off';
describe = 'Disables analytics gathering and reporting for the user.';

async run({ global }: Options<AnalyticsCommandArgs>): Promise<void> {
Expand All @@ -55,11 +56,12 @@ export class AnalyticsOffModule
}
}

export class AnalyticsOnModule
export class AnalyticsEnableModule
extends AnalyticsSettingModule
implements CommandModuleImplementation<AnalyticsCommandArgs>
{
command = 'on';
command = 'enable';
aliases = 'on';
describe = 'Enables analytics gathering and reporting for the user.';
async run({ global }: Options<AnalyticsCommandArgs>): Promise<void> {
setAnalyticsConfig(global, true);
Expand Down

0 comments on commit 7ab22ed

Please sign in to comment.