File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change 2
2
3
3
GITBOOK = $(shell command -v ./node_modules/.bin/gitbook 2> /dev/null)
4
4
LINTER = $(shell command -v ./node_modules/.bin/markdownlint 2> /dev/null)
5
+ YARN = $(shell command -v yarn 2> /dev/null)
5
6
7
+
8
+ # This is run on Travis to verify linting is OK and that the guide builds
6
9
ci : lint
7
10
$(GITBOOK ) install && $(GITBOOK ) build
8
11
12
+
13
+ # Deploy new version of the guide. Will update list of contributors
9
14
deploy :
10
15
sh ./scripts/publish_gitbook.sh
11
16
17
+
18
+ # Install dependencies
12
19
deps :
13
- yarn
20
+ ifeq ($(YARN ) ,)
21
+ $(error "yarn is not available, please install it")
22
+ else
23
+ $(YARN)
24
+ endif
14
25
26
+ # Install dependencies and gitbook
15
27
install : deps
16
28
$(GITBOOK ) install
17
29
30
+
31
+ # Lint markdown files
18
32
lint :
19
33
@$(LINTER ) . --ignore node_modules && echo ' All good 👌'
20
34
35
+
36
+ # Start a server that serves the guide locally
21
37
serve :
22
- ifndef GITBOOK
38
+ ifeq ( $( GITBOOK ) ,)
23
39
$(error "GitBook is not available, please run 'make install' first")
24
40
else
25
41
$(GITBOOK) serve
You can’t perform that action at this time.
0 commit comments