forked from dwmkerr/effective-shell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
40 lines (34 loc) · 1.18 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
SHELL:=/bin/bash
# Setup tools required for local development.
.PHONY: setup
setup:
npm install
# Serve the site locally for testing.
.PHONY: serve
serve:
npm start
# Check typescript types.
typescript-check:
npm install
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:
mkdir -p ./static/downloads
./scripts/build-samples.sh
cp ./artifacts/samples.zip ./static/downloads/effective-shell-samples.zip
cp ./artifacts/samples.tar.gz ./static/downloads/effective-shell-samples.tar.gz
test -e ./static/downloads/effective-shell-samples.zip
test -e ./static/downloads/effective-shell-samples.tar.gz
npm ci && npm run build
# Create the summary structure in word format, easier to share.
.PHONY: structure
structure:
pandoc -o structure.docx -f markdown -t docx structure.md
# Create the statistics document.
.PHONY: statistics
statistics:
./scripts/wordcount.sh ./docs/*/**/index.md > statistics.csv