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
FRONTEND_CLASSIC_DIR = ./web/classic
WEB_DIR = ./web/default
WEB_CLASSIC_DIR = ./web/classic
BACKEND_DIR = .
DEV_FRONTEND_DEFAULT_PORT ?= 5173
DEV_FRONTEND_CLASSIC_PORT ?= 5174
DEV_WEB_DEFAULT_PORT ?= 5173
DEV_WEB_CLASSIC_PORT ?= 5174
DEV_COMPOSE_FILE = docker-compose.dev.yml
DEV_POSTGRES_SERVICE = postgres
DEV_BACKEND_SERVICE = new-api
......@@ -10,21 +10,21 @@ DEV_POSTGRES_DB = new-api
DEV_POSTGRES_USER = root
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:
@echo "Building default frontend..."
build-web:
@echo "Building default web..."
@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:
@echo "Building classic frontend..."
build-web-classic:
@echo "Building classic web..."
@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:
@echo "Starting backend dev server..."
......@@ -39,15 +39,15 @@ dev-api-rebuild:
@docker compose -f $(DEV_COMPOSE_FILE) up -d --build $(DEV_BACKEND_SERVICE)
dev-web:
@echo "Starting default frontend dev server..."
@echo "Default frontend: http://localhost:$(DEV_FRONTEND_DEFAULT_PORT)"
@echo "Starting default web dev server..."
@echo "Default web: http://localhost:$(DEV_WEB_DEFAULT_PORT)"
@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:
@echo "Starting classic frontend dev server..."
@echo "Starting classic web dev server..."
@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
......
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