From ac301957093d0689c98f7debe98fbb2546c9b442 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 14 Mar 2024 14:44:23 +0000 Subject: [PATCH] feat(@angular/cli): add `ng dev` alias to `ng serve` This commit adds an alias to `ng serve` --- .../angular/cli/src/commands/command-config.ts | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/packages/angular/cli/src/commands/command-config.ts b/packages/angular/cli/src/commands/command-config.ts index 6bb4fc7d2679..f0cffb01b520 100644 --- a/packages/angular/cli/src/commands/command-config.ts +++ b/packages/angular/cli/src/commands/command-config.ts @@ -90,7 +90,7 @@ export const RootCommands: Record< }, 'serve': { factory: () => import('./serve/cli'), - aliases: ['s'], + aliases: ['dev', 's'], }, 'test': { factory: () => import('./test/cli'), @@ -105,10 +105,13 @@ export const RootCommands: Record< }, }; -export const RootCommandsAliases = Object.values(RootCommands).reduce((prev, current) => { - current.aliases?.forEach((alias) => { - prev[alias] = current; - }); +export const RootCommandsAliases = Object.values(RootCommands).reduce( + (prev, current) => { + current.aliases?.forEach((alias) => { + prev[alias] = current; + }); - return prev; -}, {} as Record); + return prev; + }, + {} as Record, +);