Skip to content

Commit d6583e5

Browse files
committed
docs(@angular/cli): add ng new long description
This appears to have been deleted by mistake when we switched to Yargs. (cherry picked from commit 143fc68)
1 parent ea64def commit d6583e5

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

packages/angular/cli/src/commands/new/cli.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9+
import { join } from 'node:path';
910
import { Argv } from 'yargs';
1011
import {
1112
CommandModuleImplementation,
@@ -35,7 +36,7 @@ export class NewCommandModule
3536
command = 'new [name]';
3637
aliases = 'n';
3738
describe = 'Creates a new Angular workspace.';
38-
longDescriptionPath?: string | undefined;
39+
longDescriptionPath = join(__dirname, 'long-description.md');
3940

4041
override async builder(argv: Argv): Promise<Argv<NewCommandArgs>> {
4142
const localYargs = (await super.builder(argv)).option('collection', {
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Creates and initializes a new Angular application that is the default project for a new workspace.
2+
3+
Provides interactive prompts for optional configuration, such as adding routing support.
4+
All prompts can safely be allowed to default.
5+
6+
- The new workspace folder is given the specified project name, and contains configuration files at the top level.
7+
8+
- By default, the files for a new initial application (with the same name as the workspace) are placed in the `src/` subfolder.
9+
- The new application's configuration appears in the `projects` section of the `angular.json` workspace configuration file, under its project name.
10+
11+
- Subsequent applications that you generate in the workspace reside in the `projects/` subfolder.
12+
13+
If you plan to have multiple applications in the workspace, you can create an empty workspace by using the `--no-create-application` option.
14+
You can then use `ng generate application` to create an initial application.
15+
This allows a workspace name different from the initial app name, and ensures that all applications reside in the `/projects` subfolder, matching the structure of the configuration file.

0 commit comments

Comments
 (0)