/
githubmirror
/
angular-cli
Обзор
Документация
Войти
/
githubmirror
/
angular-cli
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/angular/cli/src/commands/cache/settings/cli.ts
47 строк
1 KB
Ash Ramirez
refactor(@angular/cli): update aio links -> adev links
06 июн 2024, 12:12
06 июн 2024, 12:12
434a374
Код
Авторство
О чём код?
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import { Argv } from 'yargs'; import { CommandModule, CommandModuleImplementation, CommandScope, } from '../../../command-builder/command-module'; import { updateCacheConfig } from '../utilities'; export class CacheDisableModule extends CommandModule implements CommandModuleImplementation { command = 'disable'; aliases = 'off'; describe = 'Disables persistent disk cache for all projects in the workspace.'; longDescriptionPath: string | undefined; override scope = CommandScope.In; builder(localYargs: Argv): Argv { return localYargs; } run(): Promise<void> { return updateCacheConfig(this.getWorkspaceOrThrow(), 'enabled', false); } } export class CacheEnableModule extends CommandModule implements CommandModuleImplementation { command = 'enable'; aliases = 'on'; describe = 'Enables disk cache for all projects in the workspace.'; longDescriptionPath: string | undefined; override scope = CommandScope.In; builder(localYargs: Argv): Argv { return localYargs; } run(): Promise<void> { return updateCacheConfig(this.getWorkspaceOrThrow(), 'enabled', true); } }