-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
80 lines (64 loc) · 1.77 KB
/
Makefile
File metadata and controls
80 lines (64 loc) · 1.77 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
.PHONY: install build dev link test clean help publish patch minor major
# Install dependencies
install:
pnpm install
# Build the CLI
build:
pnpm build
# Development mode with watch
dev:
pnpm dev
# Link CLI globally
link: build
pnpm link --global
# Run tests
test:
pnpm test
# Clean build artifacts
clean:
rm -rf dist
# Full rebuild
rebuild: clean build
# Quick build and test
quick: build
./dist/index.js --help
# Login
login:
./dist/index.js auth login
# List templates
tpl-list:
./dist/index.js tpl list
# Version bump (patch: 0.1.0 -> 0.1.1)
patch:
npm version patch --no-git-tag-version
# Version bump (minor: 0.1.0 -> 0.2.0)
minor:
npm version minor --no-git-tag-version
# Version bump (major: 0.1.0 -> 1.0.0)
major:
npm version major --no-git-tag-version
# Publish to npm (auto bump patch version)
publish: patch build
npm publish --access public
# Publish without version bump
publish-only: build
npm publish --access public
# Help
help:
@echo "Available targets:"
@echo " install - Install dependencies"
@echo " build - Build the CLI"
@echo " dev - Start development mode with watch"
@echo " link - Build and link CLI globally"
@echo " test - Run tests"
@echo " clean - Remove build artifacts"
@echo " rebuild - Clean and rebuild"
@echo " quick - Build and show help"
@echo " login - Run auth login"
@echo " tpl-list - List templates"
@echo " patch - Bump patch version (0.1.0 -> 0.1.1)"
@echo " minor - Bump minor version (0.1.0 -> 0.2.0)"
@echo " major - Bump major version (0.1.0 -> 1.0.0)"
@echo " publish - Bump patch version and publish to npm"
@echo " publish-only - Publish to npm without version bump"
@echo " help - Show this help"