blob: 21b2356f6364f50f64041a9bd004f7af7cba408a (
plain)
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
|
BUILD_DIRECTORY = ".build"
build: static/main.js
@echo "Building site"
zola build
static/main.js: $(shell find src)
@echo "Building $@"
ifeq ($(DEV_MODE), true)
@tsc \
--strict \
--noUnusedLocals \
--noUnusedParameters \
--noImplicitReturns \
--outDir $(BUILD_DIRECTORY) \
--module es2015 \
src/main.ts
@rollup \
--input $(BUILD_DIRECTORY)/main.js \
--file $@ \
--format iife
else
@tsc \
--strict \
--noUnusedLocals \
--noUnusedParameters \
--noImplicitReturns \
--outDir $(BUILD_DIRECTORY) \
--module es2015 \
src/main.ts
@rollup \
--input $(BUILD_DIRECTORY)/main.js \
--file $@ \
--format iife
@terser $@ \
--output $@ \
--compress \
--mangle
endif
clean:
@echo "Cleaning"
@rm -rf $(BUILD_DIRECTORY)
@rm -rf public
@rm -f static/main.js
|