52 - Add frontend dev-fe-* helpers to shell.nix
This commit is contained in:
parent
7143e16bf9
commit
2d5f7d074a
1 changed files with 35 additions and 0 deletions
35
shell.nix
35
shell.nix
|
|
@ -126,6 +126,35 @@ pkgs.mkShell {
|
|||
$COMPOSE exec php vendor/bin/php-cs-fixer fix "$@"
|
||||
}
|
||||
|
||||
# ===================
|
||||
# FRONTEND COMMANDS (run in the frontend/Vite container)
|
||||
# ===================
|
||||
dev-fe-test() {
|
||||
# Run the Vitest suite once. Pass-through args, e.g.: dev-fe-test src/auth
|
||||
$COMPOSE exec frontend npm test "$@"
|
||||
}
|
||||
|
||||
dev-fe-test-watch() {
|
||||
$COMPOSE exec frontend npm run test:watch "$@"
|
||||
}
|
||||
|
||||
dev-fe-lint() {
|
||||
$COMPOSE exec frontend npm run lint "$@"
|
||||
}
|
||||
|
||||
dev-fe-cs() {
|
||||
# Prettier formatting check (no changes).
|
||||
$COMPOSE exec frontend npm run format:check "$@"
|
||||
}
|
||||
|
||||
dev-fe-cs-fix() {
|
||||
$COMPOSE exec frontend npm run format "$@"
|
||||
}
|
||||
|
||||
dev-fe-build() {
|
||||
$COMPOSE exec frontend npm run build "$@"
|
||||
}
|
||||
|
||||
# ===================
|
||||
# DATABASE / MIGRATION COMMANDS
|
||||
# ===================
|
||||
|
|
@ -219,6 +248,11 @@ pkgs.mkShell {
|
|||
echo " dev-stan [args] Run PHPStan static analysis"
|
||||
echo " dev-cs [args] Check code style (dry-run)"
|
||||
echo " dev-cs-fix [args] Apply code style fixes"
|
||||
echo " dev-fe-test [args] Run frontend Vitest suite"
|
||||
echo " dev-fe-lint [args] Lint frontend (oxlint)"
|
||||
echo " dev-fe-cs [args] Check frontend formatting (Prettier)"
|
||||
echo " dev-fe-cs-fix Apply frontend formatting"
|
||||
echo " dev-fe-build Build the frontend (tsc + vite build)"
|
||||
echo " dev-migrate-diff Generate a migration from entity mappings"
|
||||
echo " dev-migrate Apply migrations to dev + test DBs"
|
||||
echo " dev-migrate-prev Roll back one migration on dev + test DBs"
|
||||
|
|
@ -226,6 +260,7 @@ pkgs.mkShell {
|
|||
echo ""
|
||||
echo "Services:"
|
||||
echo " php Symfony/FrankenPHP http://localhost:8100"
|
||||
echo " frontend React/Vite SPA http://localhost:5173"
|
||||
echo " database Postgres 16 localhost:5433"
|
||||
echo ""
|
||||
'';
|
||||
|
|
|
|||
Loading…
Reference in a new issue