-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
61 lines (50 loc) · 1.17 KB
/
Makefile
File metadata and controls
61 lines (50 loc) · 1.17 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
# check for eslint
HASESLINT := $(shell which eslint 2> /dev/null)
# check for prettier
HASPRETTIER := $(shell which prettier 2> /dev/null)
# check for stylelint
HASSTYLELINT := $(shell which stylelint 2> /dev/null)
# check for eslint
ifdef HASESLINT
ESLINT := eslint
else
ESLINT := npx eslint
endif
# check for prettier
ifdef HASPRETTIER
PRETTIER := prettier
else
PRETTIER := npx prettier
endif
# check for stylelint
ifdef HASSTYLELINT
STYLELINT := stylelint
else
STYLELINT := npx stylelint
endif
# List of files and directories to be removed
TEMP_FILES = .next/ out/ .turbo/ dist/ public/sw.js public/sw.js.map \
public/workbox-*.js public/workbox-*.js.map yarn-error.log \
.swc/ .eslintcache .prettiercache .contentlayercache \
.stylelintignorecache .stylelintignorecache.lock .stylelintcache \
.PHONY: clean
clean: # Clean web workspaces
@rm -rf $(TEMP_FILES)
.PHONY: cleanup
cleanup: # Clean web workspaces
@rm -rf $(TEMP_FILES) node_modules
.PHONY: dev
dev:
@make clean
pnpm run dev
.PHONY: build
build:
@make clean
pnpm run build
@make clean
.PHONY: format
format:
pnpm run format
.PHONY: colors
colors:
pnpm run gen:colors