Files
Portfolio/windsurf-commands.sh

48 lines
816 B
Bash
Executable File

#!/bin/bash
# Windsurf Commands Script
# This script provides common development commands for the portfolio project
set -e
show_help() {
echo "Usage: ./windsurf-commands.sh [COMMAND]"
echo ""
echo "Available commands:"
echo " lint - Run ESLint to check for code issues"
echo " lintfix - Run ESLint with auto-fix enabled"
echo " help - Show this help message"
echo ""
}
run_lint() {
echo "🔍 Running ESLint..."
npm run lint
echo "✅ Linting complete!"
}
run_lintfix() {
echo "🔧 Running ESLint with auto-fix..."
npm run lintfix
echo "✅ Linting with auto-fix complete!"
}
# Main script logic
case "${1:-help}" in
lint)
run_lint
;;
lintfix)
run_lintfix
;;
help|--help|-h)
show_help
;;
*)
echo "❌ Unknown command: $1"
echo ""
show_help
exit 1
;;
esac