Template
8707d66108
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 22s
Branch Policy Check / Verify merge target (pull_request) Successful in 2s
Universal: PR Check / Branch Policy (pull_request) Successful in 3s
Universal: PR Check / Secret Scan (pull_request) Successful in 7s
Generic: Project CI / Lint & Validate (pull_request) Successful in 24s
Universal: PR Check / Validate PR (pull_request) Successful in 7s
Universal: Auto-Assign / Assign unassigned issues and PRs (pull_request_target) Successful in 3s
Branch Cleanup / Delete merged branch (pull_request) Successful in 2s
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Generic: Project CI / Tests (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Standardize the template on `source/` as the source input directory and retire user-facing `src/` references, per issue #34. Changes: - git mv src -> source (history preserved for all .ts files) - source/*.ts: update PATH headers /src/ -> /source/ - tsconfig.json: rootDir and include point at source/ - package.json: lint script targets source/ - Makefile: add SRC_DIR := source (CI resolver source of truth) - README.md, CLAUDE.md, docs/ARCHITECTURE.md: source path refs -> source/ The `dist/` directory is retained solely as tsc's compiled build output (outDir), which is already gitignored and never committed/published; releases go through the MokoGIT release system. No new dist/ references were introduced. Authored-by: Moko Consulting
74 lines
1.8 KiB
Makefile
74 lines
1.8 KiB
Makefile
# MCP Server Makefile
|
|
# Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
PROJECT_NAME := {{PROJECT_NAME}}
|
|
PROJECT_VERSION := 1.0.0
|
|
|
|
# Source directory (single source of truth cross-checked by the MokoGIT CI resolver)
|
|
SRC_DIR := source
|
|
|
|
NPM := npm
|
|
|
|
COLOR_RESET := \033[0m
|
|
COLOR_GREEN := \033[32m
|
|
COLOR_BLUE := \033[34m
|
|
|
|
.PHONY: help
|
|
help: ## Show this help message
|
|
@echo "$(COLOR_BLUE)$(PROJECT_NAME) v$(PROJECT_VERSION)$(COLOR_RESET)"
|
|
@echo ""
|
|
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " $(COLOR_BLUE)%-20s$(COLOR_RESET) %s\n", $$1, $$2}'
|
|
@echo ""
|
|
|
|
.PHONY: install-deps
|
|
install-deps: ## Install dependencies
|
|
@$(NPM) install
|
|
@echo "$(COLOR_GREEN)✓ Dependencies installed$(COLOR_RESET)"
|
|
|
|
MOKO_PLATFORM ?= $(or $(wildcard ../mokocli),$(wildcard $(HOME)/mokocli),$(wildcard /opt/mokocli))
|
|
MINIFY_SCRIPT := $(MOKO_PLATFORM)/build/minify.js
|
|
|
|
.PHONY: minify
|
|
minify: ## Minify CSS/JS assets
|
|
@echo "Minifying assets..."
|
|
@if [ -f "$(MINIFY_SCRIPT)" ]; then \
|
|
node "$(MINIFY_SCRIPT)" $(SRC_DIR); \
|
|
elif [ -f "scripts/minify.js" ]; then \
|
|
node scripts/minify.js; \
|
|
else \
|
|
echo "No minify script found"; \
|
|
fi
|
|
|
|
.PHONY: build
|
|
build: minify ## Build TypeScript
|
|
@$(NPM) run build
|
|
@echo "$(COLOR_GREEN)✓ Build complete$(COLOR_RESET)"
|
|
|
|
.PHONY: dev
|
|
dev: ## Watch and rebuild on changes
|
|
@$(NPM) run dev
|
|
|
|
.PHONY: clean
|
|
clean: ## Clean build artifacts
|
|
@rm -rf dist
|
|
@echo "$(COLOR_GREEN)✓ Cleaned$(COLOR_RESET)"
|
|
|
|
.PHONY: setup
|
|
setup: ## Run interactive setup wizard
|
|
@$(NPM) run setup
|
|
|
|
.PHONY: start
|
|
start: ## Start the MCP server
|
|
@$(NPM) run start
|
|
|
|
.PHONY: lint
|
|
lint: ## Run linter
|
|
@$(NPM) run lint
|
|
|
|
.PHONY: ci
|
|
ci: install-deps build ## Run CI pipeline
|
|
@echo "$(COLOR_GREEN)✓ CI pipeline complete$(COLOR_RESET)"
|
|
|
|
.DEFAULT_GOAL := help
|