-
-
Notifications
You must be signed in to change notification settings - Fork 81
/
makefile
44 lines (36 loc) · 1.63 KB
/
makefile
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
SHELL:=/bin/bash
default: help
.PHONY: help
help: # Show help for each of the Makefile recipes.
@grep -E '^[a-zA-Z0-9 -]+:.*#' Makefile | sort | while read -r l; do printf "\033[1;32m$$(echo $$l | cut -f 1 -d':')\033[00m:$$(echo $$l | cut -f 2- -d'#')\n"; done
.PHONY: setup
setup: # Setup tools required for local development.
npm install --legacy-peer-deps # needed for the react signup form compatiblity
.PHONY: serve
serve: # Serve the site locally for testing.
npm start
.PHONY: typescript-check
typescript-check: # Check typescript types.
npm install --legacy-peer-deps
npm run ts:check
# Build the site, including the downloads directory. This requires that we also
# run the 'build-samples.sh' script to zip and tar the effective shell samples.
# The build recipe also tests that the samples files are created in the downloads
# folder as if we don't have them we should definitely not deploy.
.PHONY: build
build: # Build the site and artifacts.
mkdir -p ./static/downloads
./scripts/build-samples.sh
cp ./artifacts/effective-shell.zip ./static/downloads/effective-shell.zip
cp ./artifacts/effective-shell.tar.gz ./static/downloads/effective-shell.tar.gz
test -e ./static/downloads/effective-shell.zip
test -e ./static/downloads/effective-shell.tar.gz
npm ci --legacy-peer-deps && npm run build
# Create the summary structure in word format, easier to share.
.PHONY: structure
structure: # Create the structure work doc.
pandoc -o structure.docx -f markdown -t docx structure.md
# Create the statistics document.
.PHONY: statistics
statistics: # Create wordcount statistics.
./scripts/wordcount.sh ./docs/*/**/index.md > statistics.csv