-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
126 lines (99 loc) · 4.6 KB
/
Copy pathMakefile
File metadata and controls
126 lines (99 loc) · 4.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
.PHONY: install setup dev ext test test-watch coverage \
build build-ts build-ext build-native icons dist clean \
lint lint-fix format format-check bump help
# ── Install (production) ─────────────────────────
install: dist ## Build .dmg and install MeetPods as a macOS app
@for vol in /Volumes/MeetPods*; do [ -d "$$vol" ] && hdiutil detach "$$vol" 2>/dev/null; done; true
@open dist/MeetPods-*.dmg
@echo ""
@echo "\033[32m✓ DMG opened — drag MeetPods to Applications.\033[0m"
@echo ""
@echo " First launch: right-click MeetPods.app → Open (Gatekeeper bypass)."
@echo ""
@echo " Chrome extension (one-time setup):"
@echo " 1. Open \033[36mchrome://extensions\033[0m"
@echo " 2. Enable \033[33mDeveloper mode\033[0m (top right)"
@echo " 3. Click \033[33mLoad unpacked\033[0m → select:"
@echo " \033[36m/Applications/MeetPods.app/Contents/Resources/extension\033[0m"
@echo ""
# ── Development ──────────────────────────────────
setup: ## First-time dev setup (install deps + full build)
@if ! command -v mise >/dev/null 2>&1; then \
echo ""; \
echo " \033[33mTip:\033[0m Install \033[36mmise\033[0m to auto-manage Node + Python versions:"; \
echo " \033[90mhttps://mise.jdx.dev\033[0m"; \
echo " Then run: \033[36mmise install\033[0m"; \
echo ""; \
fi
npm install
@$(MAKE) build
@echo ""
@echo "\033[32m✓ Dev environment ready!\033[0m"
@echo ""
@echo " \033[36mmake dev\033[0m Launch app (dev mode)"
@echo " \033[36mmake ext\033[0m Load Chrome extension from dist/extension/"
@echo " \033[36mmake test\033[0m Run tests"
@echo ""
dev: build-ts build-ext ## Launch app in dev mode (fast — skips native rebuild)
npx electron .
ext: ## Open Chrome to load/reload the dev extension
@echo "Extension path: \033[36m$(CURDIR)/dist/extension\033[0m"
@open "chrome://extensions/"
# ── Testing ──────────────────────────────────────
test: ## Run tests
npx vitest run
test-watch: ## Run tests in watch mode
npx vitest
coverage: ## Run tests with coverage report
npx vitest run --coverage
# ── Build ────────────────────────────────────────
build: build-ts build-ext build-native ## Full build (TS + extension + native)
build-ts:
npx tsc
build-ext:
node scripts/build-extension.mjs
build-native:
npx node-gyp rebuild --directory=src/native
icons: ## Regenerate all icons (tray + app + extension + DMG + demo GIF)
node scripts/generate-icons.js
node scripts/generate-app-icon.js
node scripts/generate-extension-icons.js
node scripts/generate-dmg-background.js
node scripts/generate-demo-gif.js
dist: build ## Build .dmg installer (no auto-open)
node scripts/rebuild-native.js
npx electron-builder
clean: ## Remove all build artifacts
rm -rf dist src/native/build
bump: ## Bump version (usage: make bump V=0.2.0 or make bump V=minor)
node scripts/bump-version.mjs $(V)
# ── Code Quality ────────────────────────────────
lint: ## Run ESLint
npx eslint src/
lint-fix: ## Run ESLint with auto-fix
npx eslint src/ --fix
format: ## Format code with Prettier
npx prettier --write .
format-check: ## Check code formatting
npx prettier --check .
# ── Help ─────────────────────────────────────────
help: ## Show available commands
@echo ""
@echo " \033[1mMeetPods\033[0m — AirPods mute control for Google Meet"
@echo ""
@echo " \033[90mInstall as app:\033[0m"
@echo " \033[36mmake install\033[0m Build .dmg and install MeetPods as a macOS app"
@echo ""
@echo " \033[90mDevelopment:\033[0m"
@grep -E '^(setup|dev|ext):.*##' $(MAKEFILE_LIST) | awk -F ':.*## ' '{printf " \033[36mmake %-12s\033[0m %s\n", $$1, $$2}'
@echo ""
@echo " \033[90mTesting:\033[0m"
@grep -E '^(test|test-watch|coverage):.*##' $(MAKEFILE_LIST) | awk -F ':.*## ' '{printf " \033[36mmake %-12s\033[0m %s\n", $$1, $$2}'
@echo ""
@echo " \033[90mBuild:\033[0m"
@grep -E '^(build|icons|dist|clean):.*##' $(MAKEFILE_LIST) | awk -F ':.*## ' '{printf " \033[36mmake %-12s\033[0m %s\n", $$1, $$2}'
@echo ""
@echo " \033[90mCode quality:\033[0m"
@grep -E '^(lint|lint-fix|format|format-check):.*##' $(MAKEFILE_LIST) | awk -F ':.*## ' '{printf " \033[36mmake %-12s\033[0m %s\n", $$1, $$2}'
@echo ""
.DEFAULT_GOAL := help