chore: config for production builds with expo

This commit is contained in:
Théo LUDWIG 2024-05-20 15:45:57 +02:00
parent 651e8e2633
commit 5462b47112
Signed by: theoludwig
GPG Key ID: ADFE5A563D718F3B
6 changed files with 40 additions and 13 deletions

View File

@ -1,4 +1,4 @@
# P61 - Projet
# Habits Tracker - P61 Projet
## À propos
@ -69,24 +69,24 @@ npm run start
Ce n'est pas strictement nécessaire pour le développement de l'application (même si recommandé), de lancer [Supabase](https://supabase.io/) en local, car l'application est déjà déployée sur un serveur [Supabase](https://supabase.io/) en production (`.env.example` est pré-configuré avec cet environnement).
```sh
npm run supabase start
npm run supabase-cli start
```
#### Principales Commandes Supabase
```sh
# Pour réinitialiser la base de données avec les données de test (seed.sql)
npm run supabase db reset
npm run supabase-cli db reset
# Pour synchroniser le modèle (local) avec la base de données (remote)
npm run supabase db pull
npm run supabase-cli db pull
# Pour synchroniser la base de données (remote) avec le modèle (local)
npm run supabase db push
npm run supabase-cli db push
# Pour générer les types TypeScript
npm run supabase gen types typescript -- --local > ./infrastructure/supabase/supabase-types.ts
npm run supabase-cli gen types typescript -- --local > ./infrastructure/supabase/supabase-types.ts
# Crée un nouveau script de migration à partir des modifications déjà appliquées à votre base de données locale (remplacer `<name-of-migration>` avec le nom de la migration)
npm run supabase db diff -- -f <name-of-migration>
npm run supabase-cli db diff -- -f <name-of-migration>
```

View File

@ -1,26 +1,29 @@
{
"expo": {
"name": "p61-project",
"name": "Habits Tracker",
"slug": "p61-project",
"version": "1.0.0",
"version": "1.0.0-staging.3",
"orientation": "portrait",
"icon": "./presentation/assets/images/icon.png",
"scheme": "p61-project",
"userInterfaceStyle": "automatic",
"splash": {
"image": "./presentation/assets/images/splashscreen.jpg",
"image": "./presentation/assets/images/splashscreen.png",
"resizeMode": "cover",
"backgroundColor": "#74b6cb"
},
"assetBundlePatterns": ["**/*"],
"ios": {
"supportsTablet": true
"supportsTablet": true,
"buildNumber": "1.0.0"
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./presentation/assets/images/adaptive-icon.png",
"backgroundColor": "#ffffff"
}
},
"package": "com.theoludwig.p61project",
"versionCode": 1
},
"web": {
"bundler": "metro",
@ -30,6 +33,14 @@
"plugins": ["expo-router"],
"experiments": {
"typedRoutes": true
},
"extra": {
"router": {
"origin": false
},
"eas": {
"projectId": "5c0a922a-564b-4d62-8231-ce5aef7ff978"
}
}
}
}

15
eas.json Normal file
View File

@ -0,0 +1,15 @@
{
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"staging": {
"distribution": "internal",
"android": {
"buildType": "apk"
}
},
"production": {}
}
}

View File

@ -9,13 +9,14 @@
"ios": "expo start --ios",
"web": "expo start --web",
"expo:typed-routes": "expo customize tsconfig.json",
"build-staging:android": "eas build --platform=android --profile=staging",
"lint:commit": "commitlint",
"lint:prettier": "prettier . --check",
"lint:eslint": "eslint . --max-warnings 0 --report-unused-disable-directives --ignore-path .gitignore",
"lint:typescript": "tsc --noEmit",
"lint:staged": "lint-staged",
"test": "jest --reporters=default --reporters=jest-junit",
"supabase": "supabase --workdir \"./infrastructure\"",
"supabase-cli": "supabase --workdir \"./infrastructure\"",
"postinstall": "husky"
},
"dependencies": {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB