1
0
mirror of https://framagit.org/tykayn/date-poll-api synced 2023-08-25 08:23:11 +02:00

add instructions for production frontend funky

Signed-off-by: tykayn <15d65f2f-0b14-4f70-bf34-e130180ed62b@users.tedomum.net>
This commit is contained in:
Tykayn 2022-12-21 18:33:33 +01:00 committed by tykayn
parent ee77d61284
commit a83cfb3edf
2 changed files with 29 additions and 1 deletions

View File

@ -177,6 +177,8 @@ Use the scripts to get the framadate funky frontend and update it
```bash ```bash
bash front_update.sh bash front_update.sh
``` ```
If you wish to develop things for the frontend, do not rebuild it each time, use a live server in the funky-framadate-front folder.
## cronjob to delete expired polls ## cronjob to delete expired polls
you can open your crontabl in command line with : you can open your crontabl in command line with :
``` ```

View File

@ -24,6 +24,32 @@ cecho() {
echo -e "$text" echo -e "$text"
} }
# vérifs prérequis
if [ ! type nvm &> /dev/null ]; then
cecho red " ❌ la commande nvm est introuvable"
exit 1
fi
cecho g " ✅ nvm"
if [ ! type node &> /dev/null ]; then
cecho red " ❌ la commande node est introuvable"
exit 1
fi
cecho g " ✅ node"
if [ ! type git &> /dev/null ]; then
cecho red " ❌ la commande git est introuvable"
exit 1
fi
cecho g " ✅ git"
if [ ! type yarn &> /dev/null ]; then
cecho red " ❌ la commande yarn est introuvable"
exit 1
fi
cecho g " ✅ yarn"
# use node version 16
nvm use 16
cd funky-framadate-front cd funky-framadate-front
git reset --hard && git checkout $BRANCH && git pull git reset --hard && git checkout $BRANCH && git pull
cd .. cd ..
@ -72,7 +98,7 @@ COUNT_FILES=$(ls -larth ../public |wc -l)
cd .. cd ..
cecho b " $COUNT_FILES fichiers de build copiés dans /public" cecho b " $COUNT_FILES fichiers de build copiés dans /public"
cecho g "##################################################################" cecho g "##################################################################"
cecho b " renaming unieque name of JS chunks to common names for templates " cecho b " renaming unique name of JS chunks to common names for templates "
cd public cd public
mv runtime* runtime.js mv runtime* runtime.js