Add build testing and pre-commit hooks

- Add test-build.js script to verify standalone build locally
- Add pre-commit hook with security, build, and test checks
- Copy required-server-files.json to root of standalone for Amplify
- Add husky for automatic pre-commit validation

This ensures we test builds locally before pushing
This commit is contained in:
DaX
2025-06-19 01:03:47 +02:00
parent e1f68744e7
commit 2baac7be9f
6 changed files with 121 additions and 1 deletions

View File

@@ -9,7 +9,9 @@
"lint": "next lint",
"test": "jest",
"test:watch": "jest --watch",
"security:check": "node scripts/security-check.js"
"security:check": "node scripts/security-check.js",
"test:build": "node scripts/test-build.js",
"prepare": "husky"
},
"dependencies": {
"@types/cheerio": "^0.22.35",
@@ -32,6 +34,7 @@
"eslint": "^8.55.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.5",
"husky": "^9.1.7",
"jest": "^30.0.0",
"jest-environment-jsdom": "^30.0.0",
"postcss": "^8.4.32",