Skip to content

Commit 5439c3b

Browse files
committed
docs: add correct global readme
1 parent d51006f commit 5439c3b

File tree

2 files changed

+97
-21
lines changed

2 files changed

+97
-21
lines changed

README.md

Lines changed: 95 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,110 @@ A [SFEIR School](https://www.sfeir.com/formation/school/)
44

55
![logo](https://www.sfeir.com/img/school/formations/Angular%20200.png)
66

7-
[Calendrier des formations, liste des formateurs et programme de formation](https://www.sfeir.com/formation/school/angular-200/)
7+
[Training schedule, trainers, and program](https://www.sfeir.com/formation/school/angular-200/)
88

9-
## Installation
9+
## Overview
1010

11-
- `git clone https://github.com/sfeir-open-source/sfeir-school-angular.git`
12-
- `cd sfeir-school-angular`
13-
- `npm install`
11+
This repository contains the SFEIR School Angular 200 hands-on training. It is an Nx workspace that hosts many small Angular applications used as progressive exercises. For each step, you will find:
12+
13+
- an exercise project, and
14+
- a corresponding solution project
15+
16+
Both live under the `apps/` folder and follow the naming pattern `<nn>-<topic>` and `<nn>-<topic>-solution` (for example, `01-hands-on` and `01-hands-on-solution`).
1417

1518
## Slides
1619

17-
Les slides sont disponibles ici : [Sfeir School Angular](https://sfeir-open-source.github.io/sfeir-school-angular/)
20+
- View the slides: https://sfeir-open-source.github.io/sfeir-school-angular/
21+
- Slide sources are licensed under CC BY-ND 3.0: [docs/LICENSE](./docs/LICENSE)
22+
23+
## Prerequisites
24+
25+
- Node.js 18+ (LTS recommended)
26+
- Bun (recommended) or npm
27+
- Git
28+
29+
## Quick start
30+
31+
```bash
32+
git clone https://github.com/sfeir-open-source/sfeir-school-angular.git
33+
cd sfeir-school-angular
34+
bun install # or: npm install
35+
```
36+
37+
Serve the first exercise (default project is `01-hands-on`):
38+
39+
```bash
40+
# Using Nx directly
41+
bunx nx serve 01-hands-on
42+
# or using the provided script alias
43+
bun run client -- 01-hands-on # npm run client -- 01-hands-on
44+
```
45+
46+
Open the browser to the URL shown by the CLI (Angular defaults to http://localhost:4200 unless configured otherwise).
47+
48+
The mock API listens on http://localhost:9000 (see `apps/server-express/src/main.js`). Available endpoints include `/api/peoples`, `/api/peoples/:id`, `/api/peoples/random`, etc.
49+
50+
Run unit tests for a specific project:
51+
52+
```bash
53+
bun run client:test -- 01-hands-on # npm run client:test -- 01-hands-on
54+
```
55+
56+
Run all tests across the workspace:
57+
58+
```bash
59+
bun run test:all # npm run test:all
60+
```
61+
62+
Serve the slides locally:
63+
64+
```bash
65+
# Nx target defined in docs/project.json
66+
bunx nx serve docs
67+
```
68+
69+
## Repository structure
70+
71+
```
72+
.
73+
├─ apps/
74+
│ ├─ 01-hands-on/ # exercise
75+
│ ├─ 01-hands-on-solution/ # solution
76+
│ ├─ … # more steps and their solutions
77+
│ └─ server-express/ # mock API (Express on port 9000)
78+
├─ docs/ # Reveal.js slides and assets
79+
├─ tools/ # development utilities
80+
├─ nx.json # Nx workspace configuration
81+
├─ package.json # scripts and dependencies
82+
├─ bun.lock # Bun lockfile
83+
├─ tsconfig.base.json # base TS config
84+
├─ jest.config.ts / jest.preset.js # Jest configuration
85+
└─ LICENSE # MIT license for the code
86+
```
87+
88+
## Provided scripts (aliases)
89+
90+
The root `package.json` provides convenient aliases around Nx:
91+
92+
- `client``nx serve` (serve a project)
93+
- `client:build``nx build` (build a project)
94+
- `client:test` → run tests for multiple projects
95+
- `server:start``nx serve server-express` (start the mock API on port 9000)
96+
- `test:all` / `lint:all` → run tests/lint across the workspace
1897

19-
Les Slides sont derrière une license [CC BY ND 3.0](https://github.com/sfeir-open-source/sfeir-school-angular/blob/master/docs/LICENSE)
98+
You can pass any Angular CLI or Nx options after `--`, for example:
2099

21-
## Commandes
100+
```bash
101+
bun run client -- 01-hands-on --configuration=production
102+
```
22103

23-
La formation se déroule step by step, chaque TP ayant deux projets associés dans le dossier [`apps/`](apps), un pour la réalisation de l'excice et un autre avec la solution pour cet exercice, toujours intitulé avec le nom du projet step suivi de `-solution`.
104+
## Credits
24105

25-
Chacun de ces projets étant un projet Angular CLI, vous pouvez utiliser les commande Angular CLI habituelles.
26-
Exemple : `ng test <projet>`
106+
This project is maintained by the SFEIR Open Source team.
27107

28-
Nous avons cependant mis en place différents scripts pour vous faciliter cela. Cf. (package.json)[package.json].
29-
La majorité de ces scripts sont simplement des alias pour une commande Angular CLI. Vous pouvez donc utiliser les options de Angular CLI, mais [après l'option `--` de npm](https://docs.npmjs.com/cli/run-script.html) afin de lui indiquer qu'il s'agit d'options à passer au script et non d'options npm.
108+
## License
30109

31-
- lancer le server nodejs : `npm run server:start` (indispensable pour tous les exercices avec des appels HTTP)
32-
- lancer la Web App : `npm run client -- <projet>`
33-
- en mode prod : ̀npm run client -- <projet> --prod`
34-
- lancer les tests unitaires : `npm run client:test -- <projet>`
35-
- lancer les slides: `npm run start:prez`
110+
- Code: MIT (see [LICENSE](./LICENSE))
111+
- Slides: CC BY-ND 3.0 (see [docs/LICENSE](./docs/LICENSE))
36112

37-
Voir la [documentation d'Angular CLI](https://angular.io/cli) pour toute autre commande.
113+
See the Angular CLI documentation for additional commands: https://angular.io/cli

nx.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"cli": {
3-
"packageManager": "npm"
3+
"packageManager": "bun"
44
},
55
"tasksRunnerOptions": {
66
"default": {
@@ -136,4 +136,4 @@
136136
},
137137
"useInferencePlugins": false,
138138
"defaultBase": "main"
139-
}
139+
}

0 commit comments

Comments
 (0)