feat: Update web makefile
This commit is contained in:
11
Makefile
11
Makefile
@@ -21,10 +21,13 @@ help:
|
|||||||
@echo " KROW Workforce - Available Makefile Commands"
|
@echo " KROW Workforce - Available Makefile Commands"
|
||||||
@echo "--------------------------------------------------"
|
@echo "--------------------------------------------------"
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo " --- CORE DEVELOPMENT ---"
|
@echo " --- WEB APP DEVELOPMENT ---"
|
||||||
@echo " make install - Installs web frontend dependencies."
|
@echo " make web-install - Installs web frontend dependencies."
|
||||||
@echo " make dev - Starts the local web frontend server."
|
@echo " make web-info - List web development commands."
|
||||||
@echo " make build - Builds the web frontend for production."
|
@echo " make web-dev - Starts the local web frontend server."
|
||||||
|
@echo " make web-build - Builds the web frontend for production (ENV=dev|staging)."
|
||||||
|
@echo " make web-lint - Runs linter for web frontend."
|
||||||
|
@echo " make web-preview - Previews the web frontend build."
|
||||||
@echo " make launchpad-dev - Starts the local launchpad server (Firebase Hosting emulator)."
|
@echo " make launchpad-dev - Starts the local launchpad server (Firebase Hosting emulator)."
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo " --- MOBILE APP DEVELOPMENT ---"
|
@echo " --- MOBILE APP DEVELOPMENT ---"
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"target": "app-dev",
|
"target": "app-dev",
|
||||||
"public": "apps/web-dashboard/dist",
|
"public": "apps/web/dist",
|
||||||
"ignore": [
|
"ignore": [
|
||||||
"firebase.json",
|
"firebase.json",
|
||||||
"**/.*",
|
"**/.*",
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"target": "app-staging",
|
"target": "app-staging",
|
||||||
"public": "apps/web-dashboard/dist",
|
"public": "apps/web/dist",
|
||||||
"ignore": [
|
"ignore": [
|
||||||
"firebase.json",
|
"firebase.json",
|
||||||
"**/.*",
|
"**/.*",
|
||||||
|
|||||||
@@ -1,21 +1,45 @@
|
|||||||
# --- Core Web Development ---
|
# --- Web App Development ---
|
||||||
|
|
||||||
.PHONY: install dev build deploy-app
|
.PHONY: web-install web-info web-dev web-build web-lint web-preview web-deploy
|
||||||
|
|
||||||
install:
|
WEB_DIR := apps/web
|
||||||
|
|
||||||
|
# --- General ---
|
||||||
|
web-install:
|
||||||
@echo "--> Installing web frontend dependencies..."
|
@echo "--> Installing web frontend dependencies..."
|
||||||
@cd apps/web-dashboard && npm install
|
@cd $(WEB_DIR) && pnpm install
|
||||||
|
|
||||||
dev:
|
web-info:
|
||||||
@echo "--> Ensuring web frontend dependencies are installed..."
|
@echo "--> Web App Commands:"
|
||||||
@cd apps/web-dashboard && npm install
|
@echo " make web-install - Install dependencies"
|
||||||
@echo "--> Starting web frontend development server on http://localhost:5173 ..."
|
@echo " make web-dev - Start dev server"
|
||||||
@cd apps/web-dashboard && npm run dev
|
@echo " make web-build - Build for production (ENV=dev|staging)"
|
||||||
|
@echo " make web-lint - Run linter"
|
||||||
|
@echo " make web-preview - Preview production build"
|
||||||
|
@echo " make web-deploy - Build and deploy (ENV=dev|staging)"
|
||||||
|
|
||||||
build:
|
web-dev:
|
||||||
@echo "--> Building web frontend for production..."
|
@echo "--> Starting web frontend development server..."
|
||||||
@cd apps/web-dashboard && VITE_APP_ENV=$(ENV) npm run build
|
@cd $(WEB_DIR) && pnpm dev
|
||||||
|
|
||||||
deploy-app: build
|
web-build:
|
||||||
@echo "--> Deploying Frontend Web App to [$(ENV)] environment..."
|
@echo "--> Building web frontend for [$(ENV)] environment..."
|
||||||
|
@cd $(WEB_DIR) && pnpm build -- --mode $(ENV)
|
||||||
|
|
||||||
|
web-lint:
|
||||||
|
@echo "--> Linting web frontend..."
|
||||||
|
@cd $(WEB_DIR) && pnpm lint
|
||||||
|
|
||||||
|
web-preview:
|
||||||
|
@echo "--> Previewing web frontend build..."
|
||||||
|
@cd $(WEB_DIR) && pnpm preview
|
||||||
|
|
||||||
|
web-deploy: web-build
|
||||||
|
@echo "--> Deploying Web App to [$(ENV)] environment..."
|
||||||
@firebase deploy --only hosting:$(HOSTING_TARGET) --project=$(FIREBASE_ALIAS)
|
@firebase deploy --only hosting:$(HOSTING_TARGET) --project=$(FIREBASE_ALIAS)
|
||||||
|
|
||||||
|
# Aliases for root level access
|
||||||
|
install: web-install
|
||||||
|
dev: web-dev
|
||||||
|
build: web-build
|
||||||
|
deploy-app: web-deploy
|
||||||
|
|||||||
Reference in New Issue
Block a user