generated from TechBooster/ReVIEW-Template
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
32 lines (22 loc) · 1.29 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
PHONY: lint fixlint build \
help
# 引数がないときはusageを表示する
.DEFAULT_GOAL := help
lint: ## Execute textlint
@$(shell npm bin)/textlint articles/*.re
fixlint: ## Fix textlint error
@$(shell npm bin)/textlint --fix articles/*.re
codepen: ## Execute codepen
@docker run --rm -v ${PWD}:/work tmknom/redpen:1.0.0 --conf redpen-conf-ja.xml --lang ja --format review --limit 0 articles/*.re
build: ## Build PDF in Docker
@./build-in-docker.sh
ebook: ## Build PDF for e-book in Docker
REVIEW_CONFIG_FILE=config-ebook.yml ./build-in-docker.sh
# node_modulesディレクトリを削除しないので、ビルドは速いがちゃんとビルドできる保証はない。
dirty-build: ## Build PDF without npm clean install
@docker run -t --rm -v ${PWD}:/book vvakame/review:4.0 /bin/bash -ci "cd /book && bundle install && REVIEW_CONFIG_FILE=config.yml npm run pdf"
dirty-ebook: ## Build PDF for e-book without npm clean install
@docker run -t --rm -v ${PWD}:/book vvakame/review:4.0 /bin/bash -ci "cd /book && bundle install && REVIEW_CONFIG_FILE=config-ebook.yml npm run pdf"
# 各コマンドについたコメントを表示する
help: ## Show usages
@grep -E '^[a-zA-Z_-{\.}]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}'