-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
58 lines (50 loc) · 1.35 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
49
50
51
52
53
54
55
56
57
58
.PHONY: build
build: fe-build
go build -v github.com/verbumby/verbum/backend/verbum
.PHONY: build-ci
build-ci:
go build -v github.com/verbumby/verbum/backend/verbum
.PHONY: run
run: build
./verbum serve
.PHONY: build-parsers
build-parsers:
cd backend/dictionary/dslparser && pigeon -o grammar.go grammar.peg
.PHONY: fe-lint
fe-lint:
npx tsc --noEmit
.PHONY: fe-build
fe-build:
npx esbuild frontend/server.tsx \
--bundle \
--define:process.env.NODE_ENV='"production"' \
--define:global='globalThis' \
--minify \
--sourcemap=inline \
--platform=node \
--target=node20 \
--outdir=frontend/dist
rm frontend/dist/server.css
rm -f frontend/dist/public/*.{js,js.map,css,css.map,png}
npx esbuild frontend/browser.tsx frontend/theme.ts \
--bundle \
--define:process.env.NODE_ENV='"production"' \
--minify \
--sourcemap \
--platform=browser \
--target=es2016 \
--outdir=frontend/dist/public \
--entry-names=[name]-[hash] \
--loader:.png=file
cp -v frontend/index.html frontend/dist/index.html
cp -v frontend/*.png frontend/dist/public/
.PHONY: es-run
es-run:
elastic/elasticsearch/bin/elasticsearch \
-Expack.security.enabled=false \
-Expack.profiling.enabled=false \
-Ehttp.host=127.0.0.1 \
-Ecluster.name=verbum-dev \
-Enode.name=verbum-1 \
-Ecluster.initial_master_nodes=verbum-1 \
-Epath.data=$$(pwd)/elastic/data