Skip to content

Commit

Permalink
Auto add after prettier format
Browse files Browse the repository at this point in the history
  • Loading branch information
vinicinbgs committed Dec 18, 2023
1 parent 81c7aba commit 94703c5
Show file tree
Hide file tree
Showing 4 changed files with 297 additions and 58 deletions.
7 changes: 6 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

files=$(git diff --name-only --cached)

npm run prettier -- ./src --write
npm run prettier -- ./tests --write

composer test
if [ ! -z $(echo "$files" | grep -E '\.(php)$') ]; then
git add $(echo "$files" | grep -E '\.(php)$')
composer test
fi
78 changes: 39 additions & 39 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
{
"name": "vinicinbgs/autentique-v2",
"type": "library",
"description": "Api Autentique V2",
"minimum-stability": "dev",
"keywords": [
"api",
"autentique",
"v2"
],
"scripts": {
"test": "XDEBUG_MODE=coverage vendor/bin/phpunit tests --coverage-text",
"test-coverage": "XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-html coverage/",
"load": "composer dumpautoload"
},
"homepage": "https://github.com/vinicinbgs/autentique-v2",
"license": "MIT",
"authors": [
{
"name": "Vinicius Morais Dutra",
"email": "dutra_morais@hotmail.com",
"role": "Developer"
}
],
"require": {
"php": ">=7.3",
"ext-curl": "*",
"ext-json": "*"
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"vlucas/phpdotenv": "^4.1"
},
"autoload": {
"classmap": [
"src",
"tests"
"name": "vinicinbgs/autentique-v2",
"type": "library",
"description": "Api Autentique V2",
"minimum-stability": "dev",
"keywords": [
"api",
"autentique",
"v2"
],
"scripts": {
"test": "XDEBUG_MODE=coverage vendor/bin/phpunit tests --coverage-text",
"test-coverage": "XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-html coverage/",
"load": "composer dumpautoload"
},
"homepage": "https://github.com/vinicinbgs/autentique-v2",
"license": "MIT",
"authors": [
{
"name": "Vinicius Morais Dutra",
"email": "dutra_morais@hotmail.com",
"role": "Developer"
}
],
"psr-4": {
"vinicinbgs\\Autentique\\": "src/"
"require": {
"php": ">=7.3",
"ext-curl": "*",
"ext-json": "*"
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"vlucas/phpdotenv": "^5.4.1"
},
"autoload": {
"classmap": [
"src",
"tests"
],
"psr-4": {
"vinicinbgs\\Autentique\\": "src/"
}
}
}
}
Loading

0 comments on commit 94703c5

Please sign in to comment.