-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
55 lines (38 loc) · 1.63 KB
/
Copy pathMakefile
File metadata and controls
55 lines (38 loc) · 1.63 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
# Created by Deepak Sharma on 13/07/2026.
# XBridge — build & distribution automation.
# Read name/version straight from package.json so the VSIX name stays in sync.
NAME := $(shell node -p "require('./package.json').name")
VERSION := $(shell node -p "require('./package.json').version")
BUILD_DIR := builds
VSIX := $(BUILD_DIR)/$(NAME)-$(VERSION).vsix
VSCE := npx --yes @vscode/vsce
.DEFAULT_GOAL := help
.PHONY: help install compile watch check lint package vsix install-ext uninstall-ext publish clean
help: ## Show this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-14s\033[0m %s\n", $$1, $$2}'
install: ## Install npm dependencies
npm install
compile: ## Type-check and bundle (development build)
npm run compile
watch: ## Rebuild on change
npm run watch
check: ## Type-check only
npm run check-types
lint: ## Run eslint
npm run lint
package: ## Production bundle (no VSIX)
npm run package
vsix: package ## Build the distributable VSIX into builds/
@mkdir -p $(BUILD_DIR)
$(VSCE) package -o $(VSIX)
@echo "Built $(VSIX)"
CODE := $(shell which code 2>/dev/null || echo "/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code")
install-ext: vsix ## Build the VSIX and install it into VS Code
"$(CODE)" --install-extension $(VSIX) --force
uninstall-ext: ## Remove the extension from VS Code
"$(CODE)" --uninstall-extension $(shell node -p "require('./package.json').publisher").$(NAME)
publish: ## Publish to the VS Code Marketplace (requires VSCE_PAT)
$(VSCE) publish
clean: ## Remove build artifacts
rm -rf dist *.vsix $(BUILD_DIR)