feat : ajout config vitest/make/pre-commit/commit-msg + un exemple de test vitest

This commit is contained in:
2026-02-23 11:29:16 +01:00
parent 65d9060e26
commit 82ecc9cfe2
8 changed files with 1301 additions and 1 deletions

30
makefile Normal file
View File

@@ -0,0 +1,30 @@
.PHONY: start install dev dev-prepare lint test pre-commit copy-git-hook node-use
start: copy-git-hook node-use install
install:
npm install
dev:
npm run dev
dev-prepare:
npm run dev:prepare
lint: dev-prepare
npm run lint
test:
npm run test
pre-commit: lint test
copy-git-hook:
cp pre-commit .git/hooks/pre-commit
cp commit-msg .git/hooks/commit-msg
chmod a+x .git/hooks/pre-commit
chmod a+x .git/hooks/commit-msg
# Force la version node
node-use:
bash -lc 'source "$$HOME/.nvm/nvm.sh" && nvm install && nvm use'