Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(command): add new install command & update config options (#4)
- Loading branch information
Showing
9 changed files
with
537 additions
and
555 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
FILES=$(git diff --name-only --cached | grep -E '\.(php)$' | tr '\n' ' ') | ||
PHP_CS_FIXER=vendor/bin/php-cs-fixer | ||
|
||
FILES=$(git diff --name-only --cached --diff-filter=d | grep -E '\.(php)$' | tr '\n' ' ') | ||
if [ -z "$FILES" ] | ||
then | ||
echo "php files not found." | ||
else | ||
vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php ${FILES} | ||
elif [ -f "$PHP_CS_FIXER" ]; then | ||
$PHP_CS_FIXER fix --config=.php-cs-fixer.dist.php ${FILES} | ||
git add ${FILES} | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.