Skip to content

Commit 29855bf

Browse files
committed
docs: improve README files generated by Angular schematics
1 parent a68e832 commit 29855bf

File tree

2 files changed

+90
-19
lines changed

2 files changed

+90
-19
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,63 @@
11
# <%= classify(name) %>
22

3-
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version <%= angularLatestVersion %>.
3+
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version <%= angularLatestVersion %>.
44

55
## Code scaffolding
66

7-
Run `ng generate component component-name --project <%= name %>` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project <%= name %>`.
8-
> Note: Don't forget to add `--project <%= name %>` or else it will be added to the default project in your `angular.json` file.
7+
Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
98

10-
## Build
9+
```bash
10+
ng generate component component-name
11+
```
1112

12-
Run `ng build <%= name %>` to build the project. The build artifacts will be stored in the `dist/` directory.
13+
For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
1314

14-
## Publishing
15+
```bash
16+
ng generate --help
17+
```
1518

16-
After building your library with `ng build <%= name %>`, go to the dist folder `cd dist/<%= dasherize(name) %>` and run `npm publish`.
19+
## Building
20+
21+
To build the library, run:
22+
23+
```bash
24+
ng build <%= name %>
25+
```
26+
27+
This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
28+
29+
### Publishing the Library
30+
31+
Once the project is built, you can publish your library by following these steps:
32+
33+
1. Navigate to the `dist` directory:
34+
```bash
35+
cd dist/<%= dasherize(name) %>
36+
```
37+
38+
2. Run the `npm publish` command to publish your library to the npm registry:
39+
```bash
40+
npm publish
41+
```
1742

1843
## Running unit tests
1944

20-
Run `ng test <%= name %>` to execute the unit tests via [Karma](https://karma-runner.github.io).
45+
To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
46+
47+
```bash
48+
ng test
49+
```
50+
51+
## Running end-to-end tests
52+
53+
For end-to-end (e2e) testing, run:
54+
55+
```bash
56+
ng e2e
57+
```
58+
59+
Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
2160

22-
## Further help
61+
## Additional Resources
2362

24-
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
63+
For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,59 @@
11
# <%= utils.classify(name) %>
22

3-
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version <%= version %>.
3+
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version <%= version %>.
44

55
## Development server
66

7-
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.
7+
To start a local development server, run:
8+
9+
```bash
10+
ng serve
11+
```
12+
13+
Once the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files.
814

915
## Code scaffolding
1016

11-
Run `ng generate component component-name` to generate a new component. You can also use `ng generate --help` to see all the available schematics you can generate.
17+
Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
18+
19+
```bash
20+
ng generate component component-name
21+
```
22+
23+
For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
24+
25+
```bash
26+
ng generate --help
27+
```
1228

13-
## Build
29+
## Building
1430

15-
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
31+
To build the project run:
32+
33+
```bash
34+
ng build
35+
```
36+
37+
This will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed.
1638

1739
## Running unit tests
1840

19-
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
41+
To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
42+
43+
```bash
44+
ng test
45+
```
2046

2147
## Running end-to-end tests
2248

23-
Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
49+
For end-to-end (e2e) testing, run:
50+
51+
```bash
52+
ng e2e
53+
```
54+
55+
Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
2456

25-
## Further help
57+
## Additional Resources
2658

27-
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
59+
For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.

0 commit comments

Comments
 (0)