feat: Update web makefile

This commit is contained in:
dhinesh-m24
2026-02-04 11:56:19 +05:30
parent fcb1ddbbb3
commit d3378e4822
3 changed files with 47 additions and 20 deletions

View File

@@ -21,10 +21,13 @@ help:
@echo " KROW Workforce - Available Makefile Commands"
@echo "--------------------------------------------------"
@echo ""
@echo " --- CORE DEVELOPMENT ---"
@echo " make install - Installs web frontend dependencies."
@echo " make dev - Starts the local web frontend server."
@echo " make build - Builds the web frontend for production."
@echo " --- WEB APP DEVELOPMENT ---"
@echo " make web-install - Installs web frontend dependencies."
@echo " make web-info - List web development commands."
@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 ""
@echo " --- MOBILE APP DEVELOPMENT ---"

View File

@@ -18,7 +18,7 @@
},
{
"target": "app-dev",
"public": "apps/web-dashboard/dist",
"public": "apps/web/dist",
"ignore": [
"firebase.json",
"**/.*",
@@ -33,7 +33,7 @@
},
{
"target": "app-staging",
"public": "apps/web-dashboard/dist",
"public": "apps/web/dist",
"ignore": [
"firebase.json",
"**/.*",

View File

@@ -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..."
@cd apps/web-dashboard && npm install
@cd $(WEB_DIR) && pnpm install
dev:
@echo "--> Ensuring web frontend dependencies are installed..."
@cd apps/web-dashboard && npm install
@echo "--> Starting web frontend development server on http://localhost:5173 ..."
@cd apps/web-dashboard && npm run dev
web-info:
@echo "--> Web App Commands:"
@echo " make web-install - Install dependencies"
@echo " make web-dev - Start dev server"
@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:
@echo "--> Building web frontend for production..."
@cd apps/web-dashboard && VITE_APP_ENV=$(ENV) npm run build
web-dev:
@echo "--> Starting web frontend development server..."
@cd $(WEB_DIR) && pnpm dev
deploy-app: build
@echo "--> Deploying Frontend Web App to [$(ENV)] environment..."
web-build:
@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)
# Aliases for root level access
install: web-install
dev: web-dev
build: web-build
deploy-app: web-deploy