-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (31 loc) · 841 Bytes
/
Makefile
File metadata and controls
41 lines (31 loc) · 841 Bytes
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
HUGO = hugo
BINDIR = bin
HTMLTEST=$(BINDIR)/htmltest
HTMLTEST_VERSION=v0.17.0
V = 0
Q = $(if $(filter 1,$V),,@)
.PHONY: all
all: run
.PHONY: setup
setup:
$Q npm install
.PHONY: run
run: setup
$Q $(HUGO) server
.PHONY: preview
preview: setup
$Q $(HUGO) server --disableFastRender --navigateToChanged --templateMetrics --templateMetricsHints --watch --forceSyncStatic -e production --minify --bind 0.0.0.0
.PHONY: dist
dist: setup
$Q $(HUGO) --gc --minify --templateMetrics --templateMetricsHints --forceSyncStatic
$Q find public -type f -exec chmod a+w {} \;
.PHONY: get-htmltest
get-htmltest:
$Q mkdir -p $(BINDIR)
$Q test -x $(HTMLTEST) || GOBIN="$(PWD)/$(BINDIR)/" go install github.com/wjdp/htmltest@$(HTMLTEST_VERSION)
.PHONY: test
test: get-htmltest
$Q $(HTMLTEST) public
clean:
$Q rm -rf public
$Q rm -rf $(BINDIR)