chore: initial project setup for newzy
Add repository scaffolding: .gitignore, README, CONTRIBUTING, MIT license, pre-push quality hook, and documentation covering branching, file conventions, and commit style. Establish the main/develop branching strategy. This is project setup only; no application functionality is included.
This commit is contained in:
commit
357a72114b
9 files changed
+569
No files matched your search
Executable
+28
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env sh
|
||||
# pre-push — code quality checks before pushing to the remote.
|
||||
#
|
||||
# Install (per clone):
|
||||
# git config core.hooksPath hooks
|
||||
#
|
||||
# The hook is a no-op until the application toolchain (package.json)
|
||||
# exists. When it does, `lint` and `test` scripts are run if defined.
|
||||
|
||||
status=0
|
||||
|
||||
if [ -f package.json ]; then
|
||||
if npm run lint --if-present --silent; then
|
||||
echo "pre-push: lint passed"
|
||||
else
|
||||
echo "pre-push: lint FAILED — push aborted" >&2
|
||||
status=1
|
||||
fi
|
||||
|
||||
if [ "$status" -eq 0 ] && npm run test --if-present --silent; then
|
||||
echo "pre-push: tests passed"
|
||||
else
|
||||
[ "$status" -eq 0 ] && echo "pre-push: tests FAILED — push aborted" >&2
|
||||
status=1
|
||||
fi
|
||||
fi
|
||||
|
||||
exit "$status"
|
||||
Reference in new issue
Block a user