-
Notifications
You must be signed in to change notification settings - Fork 1k
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (36 loc) · 1.05 KB
/
Makefile
File metadata and controls
44 lines (36 loc) · 1.05 KB
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
.PHONY: ci build deploy deps lint serve
YARN = $(shell command -v yarn 2> /dev/null)
MARKDOWNLINT = $(shell command -v ./node_modules/.bin/markdownlint 2> /dev/null)
# This is run on CI to verify linting is OK and that the guide builds
ci: lint build
# Build the Docusaurus site
build:
ifeq ($(YARN),)
$(error "yarn is not available, please install Yarn")
else
$(YARN) run build
endif
# Deploy new version of the guide
deploy:
sh ./scripts/publish_docusaurus.sh
# Install dependencies
deps:
ifeq ($(YARN),)
$(error "yarn is not available, please install Yarn")
else
$(YARN) install
endif
# Lint markdown files
lint:
ifeq ($(MARKDOWNLINT),)
$(error "markdownlint is not installed, run 'make deps' to install it")
else
@$(MARKDOWNLINT) . --ignore node_modules --ignore build && echo 'All good 👌'
endif
# Start a development server
serve:
ifeq ($(YARN),)
$(error "yarn is not available, please install Yarn")
else
@$(YARN) start || (echo "❌ Error: 'make serve' failed!" && echo "💡 Try running 'make deps' first to install dependencies" && exit 1)
endif