Skip to content

Commit

Permalink
feat(@angular/cli): add ng dev alias to ng serve
Browse files Browse the repository at this point in the history
This commit adds an alias to `ng serve`
  • Loading branch information
alan-agius4 committed Mar 14, 2024
1 parent 021a434 commit ac30195
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions packages/angular/cli/src/commands/command-config.ts
Expand Up @@ -90,7 +90,7 @@ export const RootCommands: Record<
},
'serve': {
factory: () => import('./serve/cli'),
aliases: ['s'],
aliases: ['dev', 's'],
},
'test': {
factory: () => import('./test/cli'),
Expand All @@ -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<string, CommandConfig>);
return prev;
},
{} as Record<string, CommandConfig>,
);

0 comments on commit ac30195

Please sign in to comment.