-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
155 lines (122 loc) · 3.61 KB
/
Makefile
File metadata and controls
155 lines (122 loc) · 3.61 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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
# Database commands
db.start:
docker-compose up -d
db.stop:
docker-compose down
db.drop:
rm -rf ./postgres-data
db.reset:
make db.stop && make db.drop && make db.start
db.logs:
docker-compose logs -f postgres
# Test setup and execution
tests.setup:
npm run setup-db
tests.unit:
npm run test:unit
tests.integration:
make tests.setup && npm run test:integration
tests:
make tests.setup && npm test
tests.with.coverage:
make tests.setup && npm run test:coverage
tests.watch:
npm run test:watch
tests.ci:
npm run ci
# Development commands
dev:
npm run dev
build:
npm run build
build.clean:
npm run build:clean && npm run build
# Linting and formatting
lint:
npm run lint
lint.fix:
npm run lint:fix
format:
npm run format
format.check:
npm run format:check
type.check:
npm run type-check
# Install and setup
install:
npm install
install.clean:
rm -rf node_modules package-lock.json && npm install
outdated:
npm run outdated
# CI/CD commands
ci.lint:
npm run lint:strict && npm run format:check
ci.type:
npm run type-check
ci.test:
make tests.ci
ci.build:
npm run build
ci.all:
make ci.lint && make ci.type && make ci.build && make ci.test
# Documentation
doc:
npm run build && echo "Documentation built successfully"
# Publishing (for future use)
publish.dry:
echo "Dry run publish - not implemented yet"
publish:
echo "Publish - not implemented yet"
# Utility commands
clean:
npm run build:clean
rm -rf node_modules
rm -rf .nyc_output
rm -rf coverage
help:
@echo "Available commands:"
@echo " Database:"
@echo " db.start - Start PostgreSQL database"
@echo " db.stop - Stop PostgreSQL database"
@echo " db.drop - Drop database data"
@echo " db.reset - Reset database (stop, drop, start)"
@echo " db.logs - Show database logs"
@echo ""
@echo " Testing:"
@echo " tests.setup - Setup test database"
@echo " tests.unit - Run unit tests"
@echo " tests.integration - Run integration tests"
@echo " tests - Run all tests"
@echo " tests.with.coverage - Run tests with coverage"
@echo " tests.watch - Run tests in watch mode"
@echo " tests.ci - Run CI test suite"
@echo ""
@echo " Development:"
@echo " dev - Start development mode"
@echo " build - Build all packages"
@echo " build.clean - Clean and rebuild"
@echo ""
@echo " Code Quality:"
@echo " lint - Run ESLint"
@echo " lint.fix - Fix ESLint issues"
@echo " format - Format code with Prettier"
@echo " format.check - Check code formatting"
@echo " type.check - Run TypeScript type checking"
@echo ""
@echo " Setup:"
@echo " install - Install dependencies"
@echo " install.clean - Clean install dependencies"
@echo " outdated - Check for outdated packages"
@echo ""
@echo " CI/CD:"
@echo " ci.lint - Run linting checks"
@echo " ci.type - Run type checking"
@echo " ci.test - Run CI test suite"
@echo " ci.build - Run build"
@echo " ci.all - Run full CI pipeline"
@echo ""
@echo " Utilities:"
@echo " clean - Clean all build artifacts"
@echo " help - Show this help message"
.PHONY: db.start db.stop db.drop db.reset db.logs tests.setup tests.unit tests.integration tests tests.with.coverage tests.watch tests.ci dev build build.clean lint lint.fix format format.check type.check install install.clean outdated ci.lint ci.type ci.test ci.build ci.all doc publish.dry publish clean help