-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
73 lines (59 loc) · 1.62 KB
/
Copy pathMakefile
File metadata and controls
73 lines (59 loc) · 1.62 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
# Makefile for Next.js Personal Website
.PHONY: help install dev build start lint clean test type-check format preview deploy
# Default target - show help
help:
@echo "Available commands:"
@echo " make install - Install dependencies"
@echo " make dev - Start development server"
@echo " make build - Build for production"
@echo " make start - Start production server"
@echo " make lint - Run linter"
@echo " make type-check - Run TypeScript type checking"
@echo " make format - Format code with Prettier"
@echo " make clean - Clean build artifacts and caches"
@echo " make preview - Build and start production preview"
@echo " make deploy - Build for deployment (runs build and type-check)"
# Install dependencies
install:
pnpm install
# Development
dev:
pnpm dev
# Build for production
build:
pnpm build
# Start production server
start:
pnpm start
# Linting
lint:
pnpm lint
# Type checking
type-check:
pnpm tsc --noEmit
# Format code with Prettier (if configured)
format:
pnpm prettier --write "**/*.{js,jsx,ts,tsx,json,css,md}"
# Clean build artifacts and caches
clean:
rm -rf .next
rm -rf node_modules/.cache
rm -rf .turbo
rm -rf out
# Build and preview production build locally
preview: build
pnpm start
# Full deployment build (type-check, lint, then build)
deploy: type-check lint build
@echo "✅ Ready for deployment!"
# Development with clean build
dev-clean: clean
make dev
# Fresh install and development
fresh: clean
rm -rf node_modules
pnpm install
make dev
# Check everything before committing
pre-commit: type-check lint
@echo "✅ All checks passed!"