diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..8fa6fb4 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,27 @@ +module.exports = { + parserOptions: { + ecmaVersion: 2021, + sourceType: 'module' + }, + env: { + browser: true, + }, + plugins: [ + 'react', + 'react-hooks' + ], + extends: [ + 'eslint:recommended', + 'plugin:react/recommended', + 'plugin:react/jsx-runtime', + 'plugin:react-hooks/recommended' + ], + rules: { + 'react/no-unescaped-entities': 0 + }, + settings: { + react: { + version: 'detect' + } + } +}; diff --git a/README.md b/README.md index 4b02518..5ce481f 100644 --- a/README.md +++ b/README.md @@ -5,5 +5,18 @@ * Les administrateurs (coachs) d'une equipe peuvent diffuser leurs tactiques à leurs élèves. * Les élèves peuvent aussi proposer leurs propres tactiques que les coachs peuvent à leurs tour approuver. +## Construire l'application + +Ce projet utilise NPM comme gestionnaire de paquets, mais vous pouvez remplacer NPM par Yarn ou PNPM. + +Une fois le dépôt cloné : + +```bash +npm install # Installe les dépendances +npm run build # Construit l'application +npm run dev # Démarre le serveur de développement +npm run test # Lance les tests +``` + ## Contribuer Dans le code ou dans la documentation, merci d'ecrire en anglais si possible diff --git a/drone/.drone.yml b/drone/.drone.yml index 5a474cf..0897071 100644 --- a/drone/.drone.yml +++ b/drone/.drone.yml @@ -1,42 +1,3 @@ -kind: pipeline -type: docker -name: Android - -steps: - - name: Deliver - image: override6/tbasket-frontend:latest - workspace: - path: /src/android - environment: - SSH_PRIVATE_KEY: - from_secret: SSH_PRIVATE - SSH_PUBLIC_KEY: - from_secret: SSH_PUBLIC - commands: - - bash drone/deliver.sh android - - bash drone/android-sign.sh - ---- - -kind: pipeline -type: docker -name: Electron - -steps: - - name: Deliver - image: override6/tbasket-frontend:latest - workspace: - path: /src/electron - environment: - SSH_PRIVATE_KEY: - from_secret: SSH_PRIVATE - SSH_PUBLIC_KEY: - from_secret: SSH_PUBLIC - commands: - - bash drone/deliver.sh electron - ---- - kind: pipeline type: docker name: Apache diff --git a/drone/deliver.sh b/drone/deliver.sh index 89e6feb..55aff05 100755 --- a/drone/deliver.sh +++ b/drone/deliver.sh @@ -33,6 +33,8 @@ case "$TYPE" in ;; "browser") OUT_DIR="platforms/browser/www/" + mkdir -p "$OUT_DIR" + npm install && npm run build -- --outDir "$OUT_DIR" if [ "$DRONE_BRANCH" = "production" ]; then SERV_DIR="public_html/basket" else SERV_DIR="/server/apache/TBasket/" @@ -46,18 +48,10 @@ case "$TYPE" in ;; esac - -#install cordova - - -cordova platform add "$TYPE" || exit 1 -cordova build "$TYPE" $OPTIONS || exit 1 echo "delivering outputs on server" - - echo "making delivery onto '$USER@$IP:$SERV_DIR'" rsync -avz -I \ --rsync-path="mkdir -p \"$SERV_DIR\" && rsync" \ -e "ssh -o StrictHostKeyChecking=no" \ - --delete "$OUT_DIR" "$USER@$IP:/$SERV_DIR" \ No newline at end of file + --delete "$OUT_DIR" "$USER@$IP:/$SERV_DIR" diff --git a/index.html b/index.html new file mode 100644 index 0000000..8087193 --- /dev/null +++ b/index.html @@ -0,0 +1,12 @@ + + +
+ +Equipe 1
Equipe 2
Equipe 3
Equipe 3
Equipe 3
Equipe 3
Equipe 1
Equipe 2
Equipe 3
Equipe 3
Equipe 3
Equipe 3
Schéma 1
Schéma 2
Schéma 3
Schéma 3