#117 part 1: New documentation website (#151)

This commit concerns the first subtask of this issue: https://github.com/JohnXLivingston/peertube-plugin-livechat/issues/117

It provide a brand new documentation website, that replace the previous markdown files.
The website is auto-generated using CI/CD, and can be found here: https://johnxlivingston.github.io/peertube-plugin-livechat/
This commit is contained in:
John Livingston
2023-02-13 17:58:06 +01:00
committed by GitHub
parent dc1de61a95
commit e17257a90f
114 changed files with 2302 additions and 990 deletions

View File

@ -0,0 +1,10 @@
+++
title="Develop"
description="Develop"
weight=40
chapter=false
+++
{{% notice warning %}}
This page is not yet translated in your language, please refer to the english version. You can switch to it by using the language selector in the left menu.
{{% /notice %}}

View File

@ -0,0 +1,64 @@
+++
title="Develop"
description="Develop"
weight=40
chapter=false
+++
Always talk about features you want to develop by creating/finding and commenting the issue tackling your problem
before you start working on it, and inform the community that you begin coding by claiming the issue.
Please use the `develop` branch. The `main` branch is reserved to released versions of the plugin, so that the documentation is always synchronized with the released version of the plugin.
Prerequisite for building this plugin:
- you must have `npm` installed
- you must have python venv installed (`python3-venv` package on Debian for example)
To clone the repository:
```bash
# Clone the repository
git clone https://github.com/JohnXLivingston/peertube-plugin-livechat.git
# Checkout the develop branch
git checkout develop
# Initialize the submodules. This command must be run again if any submodules' version changes.
git submodule update --init --recursive
# Install NPM dependencies and build the module for the first time:
npm install
# Build the plugin after a modification:
npm run build
# If you have a fork from the repository, add it as remote (example):
git remote add me git@github.com:MY_GITHUB_ACCOUNT/peertube-plugin-livechat.git
# Create a local branch for you developments, and checkout it (example):
git checkout my_development # Note: if an issue is associated, use fix_1234 as your branch name (where 1234 is the issue's number)
# To propose your modifications, push your branch to your repository (example):
git push --set-upstream me my_development
# Then go to your github repository with your web browser to propose the Pull Request (see additional instructions below)
```
Once you are ready to show your code to ask for feedback, submit a *draft* Pull Request.
Once you are ready for a code review before merge, submit a Pull Request. In any case, please
link your PR to the issues it solves by using the GitHub syntax: "fixes #issue_number".
The front-end code is in the `client` folder, the back-end code in `server`. There are some shared code in `shared` folder.
For general instructions (developping plugins, building, installation, ...), please refer to the [Peertube documentation](https://docs.joinpeertube.org/contribute-plugins?id=write-a-plugintheme).
You can build the plugin with extra debug features simply by using:
```bash
NODE_ENV=dev npm run build
```
## ESBuild vs Typescript
This plugin uses ESBuild for frontend code generation, as the official `peertube-plugin-quickstart` plugin.
ESBuild can handle Typescript, but does not check types
(see [ESBuild documentation](https://esbuild.github.io/content-types/#typescript)).
That's why we first compile Typescript with the `-noEmit` option, just to check types (`check:client:ts` in package.json file).
Then, if everything is okay, we run ESBuild to generate the compiled javascript.

View File

@ -0,0 +1,62 @@
+++
title="Développer"
description="Développer et proposer des modifications de code"
weight=40
chapter=false
+++
Toujours annoncer les fonctionnalités sur lesquelles vous voulez travailler en créant un ticket ou en commentant un ticket existant, avant de commencer à travailler dessus. Et annoncez clairement à la communauté que vous commencez à travailler dessus. Ceci afin d'éviter que plusieurs personnes travaillent sur la même chose et entrent en conflit.
Merci d'utiliser la branche `develop`. La branche `main` est réservée aux versions publiées, pour que la documentation affichée reste synchronisée avec la version publiée du plugin.
Pré-requis pour compiler le plugin:
- vous devez avoir installé `npm`
- vous devez avoir installé les venv python (paquet `python3-venv` sous Debian par exemple)
Pour clôner le dépot :
```bash
# Cloner le dépot
git clone https://github.com/JohnXLivingston/peertube-plugin-livechat.git
# Passer sur la branche develop
git checkout develop
# Initialiser les sous-modules. Cette commande est à refaire si jamais la version d'un l'un des sous-module change.
git submodule update --init --recursive
# Installer les dépendances NPM et compiler le plugin pour la première fois :
npm install
# Compiler le plugin après une modification :
npm run build
# Si vous avez un fork du dépot, ajoutez le en remote (exemple) :
git remote add me git@github.com:MON_COMPTE_GITHUB/peertube-plugin-livechat.git
# Créez une branche locale pour vos développements et placez vous dessus (exemple) :
git checkout mon_developpement # NB: si un ticket y est associé, utilisé le nom fix_1234 (où 1234 est le numéro du ticket)
# Pour proposer vos modifications, poussez votre branche sur votre dépot (exemple) :
git push --set-upstream me mon_developpement
# Rendez-vous ensuite sur votre dépot github avec votre navigateur web pour proposer la Pull Request (voir les instructions complémentaires ci-dessous)
```
Quand vous êtes prêt⋅e à montrer votre code pour avoir un retour, soumettez une Pull Request *draft*.
Quand vous êtes prêt⋅e pour une relecture de code avant merge, soumettez une Pull Request. Dans tous les cas, merci de lier votre Pull Request au ticket concerné en utilisant la syntax de GitHub : «fixes #issue_number».
Le code du front-end est dans le dossier `client`. Le code backend dans `server`. Il y a du code partagé entre les deux dans `shared`.
Pour les instructions génériques concernant le développement de plugins (building, installation, ...), merci de vous référer à la [documentation Peertube](https://docs.joinpeertube.org/contribute-plugins?id=write-a-plugintheme).
Vous pouvez *builder* le plugin avec des infos de debug supplémentaires en utilisant :
```bash
NODE_ENV=dev npm run build
```
## ESBuild vs Typescript
Ce plugin utilise ESBuild pour compiler le code front-end, comme le plugin `peertube-plugin-quickstart` officiel.
ESBuild peut gérer Typescript, mais ne vérifie pas les types
(voir [la documentation ESBuild](https://esbuild.github.io/content-types/#typescript)).
C'est pourquoi on compile d'abord Typescript avec l'option `-noEmit`, juste pour vérifier les types (`check:client:ts` dans le fichier package.json).
Ensuite, si tout est ok, on lance ESBuild pour générer le javascript compilé.

View File

@ -0,0 +1,10 @@
+++
title="Develop"
description="Develop"
weight=40
chapter=false
+++
{{% notice warning %}}
This page is not yet translated in your language, please refer to the english version. You can switch to it by using the language selector in the left menu.
{{% /notice %}}