forked from EPFL-ENAC/limnc-flake-documentation
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (35 loc) · 1.03 KB
/
Copy pathMakefile
File metadata and controls
43 lines (35 loc) · 1.03 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
.PHONY: setup install clean uninstall help
# Default target
help:
@echo "Available commands:"
@echo " setup - Set up repository from template (first-time setup)"
@echo " install - Install dependencies and set up git hooks"
@echo " clean - Clean node_modules and package-lock.json"
@echo " uninstall - Remove git hooks and clean dependencies"
@echo " help - Show this help message"
# Install dependencies and set up git hooks
install:
@echo "Installing npm dependencies..."
npm install
@echo "Installing git hooks with lefthook..."
npx lefthook install
@echo "Setup complete!"
# Clean dependencies
clean:
@echo "Cleaning dependencies..."
rm -rf node_modules
rm -f package-lock.json
# Uninstall hooks and clean
uninstall:
@echo "Uninstalling git hooks..."
npx lefthook uninstall || true
$(MAKE) clean
@echo "Uninstall complete!"
lint:
@echo "Running linter..."
npx prettier --check .
@echo "Linting complete!"
format:
@echo "Running formatter..."
npx prettier --write .
@echo "Formatting complete!"