-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
55 lines (46 loc) · 1.09 KB
/
Makefile
File metadata and controls
55 lines (46 loc) · 1.09 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
NODE = node
NPM = npm
PORT = 8080
PRETTIER = ./node_modules/.bin/prettier
.PHONY: all
all: install start
# Install Dep
.PHONY: install
install:
$(NPM) install
# Start the server
.PHONY: start
start:
$(NPM) start
# Development mode
.PHONY: dev
dev:
$(NPM) run dev
# Cleaning
.PHONY: clean
clean:
rm -rf node_modules
rm -rf *.log
# Format (prettier)
.PHONY: format
format:
$(PRETTIER) --write "**/*.{js,jsx,ts,tsx,json,css,html}"
.PHONY: format-check
format-check:
$(PRETTIER) --check "**/*.{js,jsx,ts,tsx,json,css,html}"
# Update
.PHONY: update
update:
git pull --force --allow-unrelated-histories
$(NPM) install
.PHONY: help
help:
@echo "Available commands:"
@echo " make - Install dependencies and start the server"
@echo " make install - Install project dependencies"
@echo " make start - Start the server"
@echo " make dev - Start in development mode"
@echo " make clean - Remove node_modules and logs"
@echo " make format - Format code using Prettier"
@echo " make update - Update repository and dependencies"
@echo " make help - Show this help message"