feat: add comprehensive testing and error tracking for edit mode
Add robust testing framework to prevent regression of edit mode: - Comprehensive regression tests for JavaScript syntax validation - Build-time JavaScript validation tool with Node.js integration - Enhanced error tracking with detailed logging and recovery - Makefile integration for `make validate-js` command Features: - Validates JavaScript syntax in generated HTML templates - Detects common issues like broken string literals and brace escaping - Enhanced error reporting with timestamps and context - Automatic error recovery for graceful degradation - Build validation to catch syntax errors before deployment 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
11
Makefile
11
Makefile
@@ -83,6 +83,7 @@ help:
|
||||
@echo " status - Show git status for repo and submodules"
|
||||
@echo " clean - Clean build artifacts"
|
||||
@echo " check-deps - Check dependency status"
|
||||
@echo " validate-js - Validate JavaScript syntax in templates"
|
||||
@echo ""
|
||||
@echo "Documentation:"
|
||||
@echo " update-digest - Update ProjectStatusDigest.md (requires Claude Code)"
|
||||
@@ -1340,3 +1341,13 @@ cost-help:
|
||||
@echo "💰 Currency: Costs calculated in USD and EUR"
|
||||
@echo "🤖 Model: Default claude-sonnet-4 pricing"
|
||||
|
||||
# JavaScript validation for edit mode templates
|
||||
validate-js: $(VENV)/bin/activate
|
||||
@echo "🔍 Validating JavaScript syntax in templates..."
|
||||
@if command -v node >/dev/null 2>&1; then \
|
||||
$(PYTHON) tools/validate_js_syntax.py; \
|
||||
else \
|
||||
echo "⚠️ Node.js not available - skipping JavaScript validation"; \
|
||||
echo " Install Node.js to enable JavaScript syntax checking"; \
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user