node and yarn install

This commit is contained in:
Tchama 2022-10-01 17:17:05 +02:00
parent 05ffe450e0
commit d9be4d7198
4 changed files with 4383 additions and 0 deletions

7
.gitignore vendored
View File

@ -4,3 +4,10 @@
# Uncomment to ignore Database datas
data
# yarn
/app/.yarncache
# phpstorm
.idea

View File

@ -18,5 +18,9 @@
"dev": "encore dev",
"watch": "encore dev --watch",
"build": "encore production --progress"
},
"dependencies": {
"sass": "^1.55.0",
"sass-loader": "^13.0.2"
}
}

4350
app/yarn.lock Normal file

File diff suppressed because it is too large Load Diff

22
docker-node.sh Executable file
View File

@ -0,0 +1,22 @@
#!/bin/bash
# Ce script permet de lancer node dans un conteneur docker séparé,
# afin de disposer des outils comme yarn (paquet npm)
# exécute toujours dans le répertoire `php`
cd $(dirname $0)
# la commande exécutée dans le conteneur
if [ $# -eq 0 ]; then
cmd=bash
else
cmd="${@}"
fi
# le conteneur node monte le dossier de l'application
docker run --rm -it \
--user "$(id -u):$(id -g)" \
--volume "${PWD}/app:/app" \
--workdir "/app" \
--env "YARN_CACHE_FOLDER=/app/.yarncache" \
node:14 ${cmd}