-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
62 lines (53 loc) · 1.56 KB
/
Copy pathMakefile
File metadata and controls
62 lines (53 loc) · 1.56 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
.PHONY: install test lint generate clean help
# Default target when just running 'make'
all: help
# Install dependencies
install:
@echo "Installing dependencies..."
bun install
# Run tests
test:
@echo "Running tests..."
bun test
# Run linter
lint:
@echo "Running linter..."
bunx @biomejs/biome check ./scripts
# Format code
format:
@echo "Formatting code..."
bunx @biomejs/biome format --write ./scripts
# Generate macros for all presets
generate:
@echo "Generating all macros..."
bun run generate
# Generate macros for a specific preset
gl mapping based on VSCode orderenerate-preset:
@echo "Generating macros for $(PRESET)..."
@if [ -z "$(PRESET)" ]; then \
echo "Error: PRESET not specified. Use 'make generate-preset PRESET=your-preset-name'"; \
exit 1; \
fi
bun run generate $(PRESET)
# Clean generated files
clean:
@echo "Cleaning generated files..."
find ./preset -name "out" -type d -exec rm -rf {}/* \; 2>/dev/null || true
@echo "Cleaning test artifacts..."
rm -rf ./__test__/test-preset-env 2>/dev/null || true
# Show help
help:
@echo "Keyboard Maestro Dynamic Script Generator"
@echo ""
@echo "Usage:"
@echo " make [target]"
@echo ""
@echo "Targets:"
@echo " install Install dependencies"
@echo " test Run tests"
@echo " lint Run linter"
@echo " format Format code"
@echo " generate Generate macros for all presets"
@echo " generate-preset PRESET=name Generate macros for specific preset"
@echo " clean Remove generated files"
@echo " help Show this help message"