Skip to content

Commit

Permalink
Add output and 1st test
Browse files Browse the repository at this point in the history
  • Loading branch information
placintaalexandru committed Oct 27, 2023
1 parent d9a6311 commit 25ac77d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ TS_FILES=$(git diff --staged --name-only | grep -c "src/")
DIST_MODIFIED=$(git diff --staged --name-only | grep -c "dist/index.js")

if [ "$TS_FILES" -gt 0 ] && [ "$DIST_MODIFIED" -eq 0 ] ; then
npm run build
echo "You modified TypeScript files but apparently did not run 'npm run build'".
exit 1;
fi

0 comments on commit 25ac77d

Please sign in to comment.