Skip to content

Update school #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @jefBinomed
23 changes: 23 additions & 0 deletions .github/workflows/check-repo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: CI/CD
on:
push:
branches: [main]
pull_request:

jobs:
check-repo:
timeout-minutes: 60
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./tests
permissions: write-all
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm ci
- name: Unit Tests
run: npm test
204 changes: 204 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,204 @@
# Contributing Guidelines

We would love for you to contribute to this project and help make it even better than it is
today! As a contributor, here are the guidelines we would like you to follow:

- [Code of Conduct](#coc)
- [Issues and Bugs](#issue)
- [Feature Requests](#feature)
- [Submission Guidelines](#submit)
- [Commit Message Guidelines](#commit)

## <a name="coc"></a> Code of Conduct

Help us keep this project open and inclusive. Please read and follow our [Code of Conduct][coc].

## <a name="issue"></a> Found a Bug?

If you find a bug in the project, you can help us by
[submitting an issue][github-issue] to our [GitHub Repository][github]. Even better, you can
[submit a Pull Request](#submit-pr) with a fix.

## <a name="feature"></a> Missing a Feature?

You can _request_ a new feature by [submitting an issue](#submit-issue) to our GitHub
repository.

If you would like to _implement_ a new feature, please submit an issue with
a proposal for your work **FIRST**, to be sure that we can use it.
Please consider what kind of change it is:

- For a **Major Feature**, first open an issue and outline your proposal so that it can be
discussed. This will also allow us to better coordinate our efforts, prevent duplication of work,
and help you to craft the change so that it is successfully accepted into the project.
- **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr).

## <a name="submit"></a> Submission Guidelines

### <a name="submit-issue"></a> Submitting an Issue

Before you submit an issue, please search the [issue tracker][issue-tracker], maybe an issue for your problem already exists and the discussion might inform you of workarounds readily available.

### <a name="submit-pr"></a> Submitting a Pull Request (PR)

Before you submit your Pull Request (PR) consider the following guidelines:

1. Search [GitHub][github-pulls] for an open or closed PR
that relates to your submission. You don't want to duplicate effort.
1. Be sure that an issue describes the problem you're fixing, or documents the design for the feature you'd like to add.
Discussing the design up front helps to ensure that we're ready to accept your work.

1. [Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo#forking-a-repository) the repository.

1. [Clone](https://docs.github.com/en/get-started/quickstart/fork-a-repo#cloning-your-forked-repository) the repository locally

1. Make your changes in a new git branch:

```bash
git checkout -b my-fix-branch main
```

1. Create your patch.

1. Commit your changes using a descriptive commit message that follows our
[commit message conventions](#commit).

1. Push your branch to GitHub:

```bash
git push origin my-fix-branch
```

1. In GitHub, [send a pull request](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork).

- If we suggest changes then:

- Make the required updates.
- Rebase your branch and force push to your GitHub repository (this will update your Pull Request):

```bash
git rebase main -i
git push -f
```

That's it! Thank you for your contribution!

#### After your pull request is merged

After your pull request is merged, you can safely delete your branch and pull the changes
from the master (upstream) repository:

- Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:

```bash
git push origin --delete my-fix-branch
```

- Check out the main branch:

```bash
git checkout main -f
```

- Delete the local branch:

```bash
git branch -D my-fix-branch
```

- Update your main branch with the latest upstream version:

```bash
git pull --ff upstream main
```

## <a name="commit"></a> Commit Message Guidelines

We have very precise rules over how our git commit messages can be formatted. This leads to **more
readable messages** that are easy to follow when looking through the **project history**.

### Commit Message Format

Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
format that includes a **type**, a **scope** and a **subject**:

```
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
```

The **header** is mandatory and the **scope** of the header is optional.

Any line of the commit message cannot be longer 100 characters! This allows the message to be easier
to read on GitHub as well as in various git tools.

The footer should contain a [closing reference to an issue](https://help.github.com/articles/closing-issues-via-commit-messages/) if any.

Samples:

```
docs(changelog): update changelog to beta.5
```

```
fix(release): need to depend on latest ng-lib

The version in our package.json gets copied to the one we publish, and users need the latest of these.
```

### Type

Must be one of the following:

- **docs**: Documentation only changes
- **feat**: A new feature
- **fix**: A bug fix

### Scope

The scope should be the name of the npm package affected (as perceived by the person reading the changelog generated from commit messages).

The following is the list of supported scopes:

- **specs**
- **project**

### Subject

The subject contains a succinct description of the change:

- use the imperative, present tense: "change" not "changed" nor "changes"
- don't capitalize the first letter
- no dot (.) at the end

### Body

Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
The body should include the motivation for the change and contrast this with previous behavior.

### Footer

The footer should contain any information about **Breaking Changes** and is also the place to
reference GitHub issues that this commit **Closes**.

**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.

Samples :

```
Close #394
```

```
BREAKING CHANGE:
change login route to /users/login
```

[coc]: /CODE_OF_CONDUCT.md
[github]: https://github.com/sfeir-open-source/sfeir-school-template
[github-issue]: https://github.com/sfeir-open-source/sfeir-school-template/issues/new
[issue-tracker]: https://github.com/sfeir-open-source/sfeir-school-template/issues
[github-pulls]: https://github.com/sfeir-open-source/sfeir-school-template/pulls
Binary file removed docs/assets/images/This_01.gif
Binary file not shown.
Binary file removed docs/assets/images/agt.png
Binary file not shown.
Binary file removed docs/assets/images/babel.png
Binary file not shown.
Binary file removed docs/assets/images/devTools.png
Binary file not shown.
Binary file removed docs/assets/images/es_encapsulation.png
Binary file not shown.
Binary file removed docs/assets/images/lets-pipe-all-functions.png
Binary file not shown.
Binary file removed docs/assets/images/logo_sfeir_bleu_orange.png
Binary file not shown.
Binary file removed docs/assets/images/logo_sfeir_noir_orange.png
Binary file not shown.
Binary file removed docs/assets/images/marbles-concatMap.png
Binary file not shown.
Binary file removed docs/assets/images/marbles-debounce.png
Binary file not shown.
Binary file not shown.
Binary file removed docs/assets/images/marbles-map.png
Binary file not shown.
Binary file removed docs/assets/images/marbles-merge.png
Binary file not shown.
Binary file removed docs/assets/images/marbles-mergeMap.png
Binary file not shown.
Binary file removed docs/assets/images/marbles-pluck.png
Binary file not shown.
Binary file removed docs/assets/images/marbles-switchMap.png
Binary file not shown.
Binary file removed docs/assets/images/marbles-take.png
Binary file not shown.
Binary file removed docs/assets/images/masque_photo.png
Binary file not shown.
Binary file removed docs/assets/images/school_Badge_blanc.png
Binary file not shown.
Binary file removed docs/assets/images/typescript.png
Binary file not shown.
1 change: 0 additions & 1 deletion docs/markdown/01-intro/01-Summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,3 @@ II. JavaScript Maintenable
- Ecrire des pipe()
1. Meilleur Architecture Front -> CQRS !
- Ecrivons notre propre Redux Impl°
1. Bonus: RxJS
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- .slide: class="exercice"-->
<!-- .slide: class="exercice" -->

# Destructuring

Expand All @@ -11,3 +11,5 @@ Modifier la signature de la fonction testDestructuring, de telle sorte qu'elle p
1. le **reste des paramètres** dans un tableau

Si aucun objet n'est passé en second paramètre, en fournir un avec comme _name_ "toto".

### npm run bases
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Dans la fonction **exercise1Fn**, compléter la création de la promise afin de
la **résoudre** avec la valeur "I love promise" au bout de 500ms. (Utiliser setTimeout).
Attacher à cette promesse un then afin de **console.log** la valeur reçue. Renvoyer la promesse résultante.

### npm run promises

##==##

<!-- .slide: class="exercice" -->
Expand All @@ -20,6 +22,8 @@ Dans la fonction **exercise2Fn**, compléter la création de la promise afin de
la **rejeter** avec la valeur "I hate rejection" au bout de 500ms. (Utiliser setTimeout).
Attacher à cette promesse un catch afin de **console.log** la valeur reçue. Renvoyer la promesse résultante.

### npm run promises

##==##

<!-- .slide: class="exercice" -->
Expand All @@ -31,3 +35,5 @@ Attacher à cette promesse un catch afin de **console.log** la valeur reçue. Re
Dans la fonction **exercise3Fn**, faire une chaîne de promesses en partant de
l'objet **exercise3** afin d'ajouter 5 à la valeur, de la multiplier par 2 et enfin de soustraire 4.
Chacune de ces opérations doivent être réalisées **dans un morceau différent de la chaîne**. Renvoyer la promesse résultante.

### npm run promises
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- .slide: class="exercice"-->
<!-- .slide: class="exercice" -->

# Classes

Expand All @@ -15,3 +15,5 @@ Créer une classe **MainCoon** qui étend la classe **Cat** avec un constructeur
Tester votre code en ouvrant une console nodejs. Importer votre code dans la console (facile si vous avez tout suivi ;) ) puis construire vos objets.

<!-- .element: style="font-size:0.8em" -->

### npm run classes
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- .slide: class="exercice"-->
<!-- .slide: class="exercice" -->

# Les générateurs

Expand All @@ -10,6 +10,8 @@ Testez votre code dans une console nodejs.

**BONUS** : Vous pouvez limiter le nombre de lignes avec une bonne utilisation du destructuring.

### npm run generators

Notes:
BONUS
: Vous pouvez limiter le nombre de ligne avec une bonne utilisation du destructuring.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- .slide: class="exercice"-->
<!-- .slide: class="exercice" -->

# Proxies - Un cas d'utilisation

Expand All @@ -12,5 +12,7 @@

<!-- .element: style="font-size:0.8em" -->

### npm run proxies

Notes:
revenir sur le piège lié au fait qu'on set dans un array aussi la length au moment du set.
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<!-- .slide: class="exercice"-->
<!-- .slide: class="exercice" -->

# Modules : On essaye !

## Lab

<!-- .slide:-->

Créer un **module-C.js** qui exporte par **défaut** une fonction appelé **moduleCFn** avec à l'intérieur un **console.log** de votre choix.

<!-- .element: style="font-size:0.8em" -->
Expand All @@ -14,6 +12,8 @@ Créer un **module-B.js** qui exporte une fonction appelé **moduleBFn** avec à

<!-- .element: style="font-size:0.8em" -->

Créer un module-A.js qui **importe** les deux fonctions précédentes (depuis les deux modules), et utilisez les. Ensuite, utiliser la commande npm run modules et observer le bundle résultant. Vous pouvez vérifier votre travail en glissant le index.html dans votre navigateur.
Créer un module-A.js qui **importe** les deux fonctions précédentes (depuis les deux modules), et utilisez les. Ensuite, utiliser la commande `npm run modules` et observer le bundle résultant. Vous pouvez vérifier votre travail en glissant le index.html dans votre navigateur.

<!-- .element: style="font-size:0.8em" -->

### npm run modules
13 changes: 0 additions & 13 deletions docs/markdown/10-static-typing/05-advanced-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,16 +138,3 @@ Notes:
le type guard est un typeof evolué => l'expression renvoyée par le type guard et bonne, alors on a la garantie que qu'en sortie on a bien un FISH ici

le type guard est identifié par le mot clé "is"

##==##

<!-- .slide -->

# Typescript - Let's Play !

Let's Play ! <!-- .element: class="text-center" -->

![h-700 center](./assets/images/lets-play.png)

Notes:
L'objectif de l'exercice est de résoudre tous les problèmes Typescript
14 changes: 14 additions & 0 deletions docs/markdown/10-static-typing/99-lab.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!-- .slide: class="exercice" -->

# Typescript - Let's Play !

## Lab

Let's Play ! <!-- .element: class="text-center" -->

![h-700 center](./assets/images/lets-play.png)

### npm run typescript

Notes:
L'objectif de l'exercice est de résoudre tous les problèmes Typescript
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- .slide: class="exercice"-->
<!-- .slide: class="exercice" -->

# Fn JS

Expand All @@ -13,3 +13,5 @@ La fonction doit :
1. filtrer par type "books"
1. transformer l'objet shoppingCart en collection de montants via map
1. calculer le montant total via reduce

### npm run functional
Loading