Skip to content

Commit ddcaf95

Browse files
committed
Add comments and fix bugs in Makefile
1 parent a875699 commit ddcaf95

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

Makefile

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,40 @@
22

33
GITBOOK = $(shell command -v ./node_modules/.bin/gitbook 2> /dev/null)
44
LINTER = $(shell command -v ./node_modules/.bin/markdownlint 2> /dev/null)
5+
YARN = $(shell command -v yarn 2> /dev/null)
56

7+
8+
# This is run on Travis to verify linting is OK and that the guide builds
69
ci: lint
710
$(GITBOOK) install && $(GITBOOK) build
811

12+
13+
# Deploy new version of the guide. Will update list of contributors
914
deploy:
1015
sh ./scripts/publish_gitbook.sh
1116

17+
18+
# Install dependencies
1219
deps:
13-
yarn
20+
ifeq ($(YARN),)
21+
$(error "yarn is not available, please install it")
22+
else
23+
$(YARN)
24+
endif
1425

26+
# Install dependencies and gitbook
1527
install: deps
1628
$(GITBOOK) install
1729

30+
31+
# Lint markdown files
1832
lint:
1933
@$(LINTER) . --ignore node_modules && echo 'All good 👌'
2034

35+
36+
# Start a server that serves the guide locally
2137
serve:
22-
ifndef GITBOOK
38+
ifeq ($(GITBOOK),)
2339
$(error "GitBook is not available, please run 'make install' first")
2440
else
2541
$(GITBOOK) serve

0 commit comments

Comments
 (0)