Commit e1fd9cc2 by QuentinHsu Committed by Calcium-Ion

chore(build): align make targets with web naming

- rename frontend make targets and variables to use the web terminology consistently.
- keep default and classic dev port overrides available under the updated names.
parent f9165e7b
FRONTEND_DIR = ./web/default WEB_DIR = ./web/default
FRONTEND_CLASSIC_DIR = ./web/classic WEB_CLASSIC_DIR = ./web/classic
BACKEND_DIR = . BACKEND_DIR = .
DEV_FRONTEND_DEFAULT_PORT ?= 5173 DEV_WEB_DEFAULT_PORT ?= 5173
DEV_FRONTEND_CLASSIC_PORT ?= 5174 DEV_WEB_CLASSIC_PORT ?= 5174
DEV_COMPOSE_FILE = docker-compose.dev.yml DEV_COMPOSE_FILE = docker-compose.dev.yml
DEV_POSTGRES_SERVICE = postgres DEV_POSTGRES_SERVICE = postgres
DEV_BACKEND_SERVICE = new-api DEV_BACKEND_SERVICE = new-api
...@@ -10,21 +10,21 @@ DEV_POSTGRES_DB = new-api ...@@ -10,21 +10,21 @@ DEV_POSTGRES_DB = new-api
DEV_POSTGRES_USER = root DEV_POSTGRES_USER = root
DEV_SQLITE_PATH ?= one-api.db DEV_SQLITE_PATH ?= one-api.db
.PHONY: all build-frontend build-frontend-classic build-all-frontends start-backend dev dev-api dev-api-rebuild dev-web dev-web-classic reset-setup .PHONY: all build-web build-web-classic build-all-web start-backend dev dev-api dev-api-rebuild dev-web dev-web-classic reset-setup
all: build-all-frontends start-backend all: build-all-web start-backend
build-frontend: build-web:
@echo "Building default frontend..." @echo "Building default web..."
@cd ./web && bun install --frozen-lockfile @cd ./web && bun install --frozen-lockfile
@cd $(FRONTEND_DIR) && DISABLE_ESLINT_PLUGIN='true' VITE_REACT_APP_VERSION=$(cat ../../VERSION) bun run build @cd $(WEB_DIR) && DISABLE_ESLINT_PLUGIN='true' VITE_REACT_APP_VERSION=$(cat ../../VERSION) bun run build
build-frontend-classic: build-web-classic:
@echo "Building classic frontend..." @echo "Building classic web..."
@cd ./web && bun install --frozen-lockfile @cd ./web && bun install --frozen-lockfile
@cd $(FRONTEND_CLASSIC_DIR) && VITE_REACT_APP_VERSION=$(cat ../../VERSION) bun run build @cd $(WEB_CLASSIC_DIR) && VITE_REACT_APP_VERSION=$(cat ../../VERSION) bun run build
build-all-frontends: build-frontend build-frontend-classic build-all-web: build-web build-web-classic
start-backend: start-backend:
@echo "Starting backend dev server..." @echo "Starting backend dev server..."
...@@ -39,15 +39,15 @@ dev-api-rebuild: ...@@ -39,15 +39,15 @@ dev-api-rebuild:
@docker compose -f $(DEV_COMPOSE_FILE) up -d --build $(DEV_BACKEND_SERVICE) @docker compose -f $(DEV_COMPOSE_FILE) up -d --build $(DEV_BACKEND_SERVICE)
dev-web: dev-web:
@echo "Starting default frontend dev server..." @echo "Starting default web dev server..."
@echo "Default frontend: http://localhost:$(DEV_FRONTEND_DEFAULT_PORT)" @echo "Default web: http://localhost:$(DEV_WEB_DEFAULT_PORT)"
@cd ./web && bun install --filter ./default @cd ./web && bun install --filter ./default
@cd $(FRONTEND_DIR) && bun run dev -- --host 0.0.0.0 --port $(DEV_FRONTEND_DEFAULT_PORT) @cd $(WEB_DIR) && bun run dev -- --host 0.0.0.0 --port $(DEV_WEB_DEFAULT_PORT)
dev-web-classic: dev-web-classic:
@echo "Starting classic frontend dev server..." @echo "Starting classic web dev server..."
@cd ./web && bun install --filter ./classic @cd ./web && bun install --filter ./classic
@cd $(FRONTEND_CLASSIC_DIR) && bun run dev -- --host 0.0.0.0 --port $(DEV_FRONTEND_CLASSIC_PORT) @cd $(WEB_CLASSIC_DIR) && bun run dev -- --host 0.0.0.0 --port $(DEV_WEB_CLASSIC_PORT)
dev: dev-api dev-web dev: dev-api dev-web
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment