Fix: harden local dev startup flow
This commit is contained in:
@@ -2,13 +2,17 @@ project_root := justfile_directory()
|
||||
local_compose := project_root + "/Docker/docker-compose.local.dev.yaml"
|
||||
frontend_dir := project_root + "/Frontend"
|
||||
node_modules_volume := "moku_work_frontend_node_modules"
|
||||
common_sh := project_root + "/Commands/Local/scripts/common.sh"
|
||||
posix_root := project_root + "/POSIX"
|
||||
|
||||
# Recreate the frontend node_modules Docker volume.
|
||||
# Recreate the frontend node_modules Docker volume (confirmation required).
|
||||
node_modules:
|
||||
bash -c 'source "{{common_sh}}"; ensure_posix_root "{{project_root}}" "{{posix_root}}"; confirm_destructive_action "This will recreate the frontend node_modules Docker volume. Continue?"'
|
||||
docker compose -f '{{local_compose}}' rm -sf frontend >/dev/null 2>&1 || true
|
||||
docker volume rm -f '{{node_modules_volume}}' >/dev/null 2>&1 || true
|
||||
docker compose -f '{{local_compose}}' up -d --remove-orphans --force-recreate frontend
|
||||
|
||||
# Run the frontend TypeScript check.
|
||||
tsc:
|
||||
bash -c 'source "{{common_sh}}"; ensure_posix_root "{{project_root}}" "{{posix_root}}"'
|
||||
cd '{{frontend_dir}}' && pnpm typecheck
|
||||
|
||||
Reference in New Issue
Block a user