You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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`).
14
17
15
18
## Slides
16
19
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)
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
18
97
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:
20
99
21
-
## Commandes
100
+
```bash
101
+
bun run client -- 01-hands-on --configuration=production
102
+
```
22
103
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
24
105
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.
27
107
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
30
109
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))
36
112
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
0 commit comments