-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
48 lines (40 loc) · 1.02 KB
/
Makefile
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
.PHONY: install build start clean lint
# Default target
all: install build
# Install dependencies
install:
npm install
# Build the project
build:
npm run build
# Start the server
start:
npm start
# Clean build artifacts
clean:
rm -rf build/
rm -rf node_modules/
# Run linter
lint:
npx eslint . --ext .ts
# Install and configure ESLint if not present
setup-lint:
npm install --save-dev eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin
echo '{\n\
"parser": "@typescript-eslint/parser",\n\
"plugins": ["@typescript-eslint"],\n\
"extends": [\n\
"eslint:recommended",\n\
"plugin:@typescript-eslint/recommended"\n\
]\n\
}' > .eslintrc.json
# Help target
help:
@echo "Available targets:"
@echo " install - Install dependencies"
@echo " build - Build the project"
@echo " start - Start the server"
@echo " clean - Remove build artifacts"
@echo " lint - Run linter"
@echo " setup-lint - Install and configure ESLint"
@echo " help - Show this help message"