feat : ajout config vitest/make/pre-commit/commit-msg + un exemple de test vitest
This commit is contained in:
30
makefile
Normal file
30
makefile
Normal 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'
|
||||
Reference in New Issue
Block a user