-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
57 lines (43 loc) · 945 Bytes
/
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
49
50
51
52
53
54
55
56
57
DIST=dist
.PHONY: help gen init
help:
cat Makefile
$(DIST):
@mkdir $(DIST)
setup:
ifneq (,$(CI))
yarn install --frozen-lockfile
else
cp .env.sample .env.development
yarn install
endif
add:
yarn add $(package)
clean:
-rm -rf $(DIST)
build: ENVIRONMENT=development
build: VITE_OPTS=
build:
yarn run vite build $(VITE_OPTS) -m $(ENVIRONMENT)
build/development: VITE_OPTS=--sourcemap
build/development:
export $$(cat .env.development) > /dev/null; $(MAKE) build ENVIRONMENT=development VITE_OPTS='--sourcemap'
build/development/watch:
$(MAKE) build/development VITE_OPTS='--watch --sourcemap'
build/serve:
export $$(cat .env.development) > /dev/null; yarn run vite serve --host 0.0.0.0
fmt:
ifneq (,$(CI))
yarn run prettier . --check
else
yarn run prettier . --write
endif
lint:
yarn run eslint src
typecheck: TSC_OPTS=
typecheck:
yarn run tsc --noEmit $(TSC_OPTS)
test/ci:
$(MAKE) lint
$(MAKE) typecheck
$(MAKE) fmt