diff --git a/README.md b/README.md index daf37fb..2bab0ed 100755 --- a/README.md +++ b/README.md @@ -177,6 +177,8 @@ Use the scripts to get the framadate funky frontend and update it ```bash 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 you can open your crontabl in command line with : ``` diff --git a/front_update.sh b/front_update.sh index 8812cfd..7135cbf 100755 --- a/front_update.sh +++ b/front_update.sh @@ -24,6 +24,32 @@ cecho() { 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 git reset --hard && git checkout $BRANCH && git pull cd .. @@ -72,7 +98,7 @@ COUNT_FILES=$(ls -larth ../public |wc -l) cd .. cecho b " $COUNT_FILES fichiers de build copiés dans /public" 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 mv runtime* runtime.js