-
Notifications
You must be signed in to change notification settings - Fork 9
/
in_docker.mk
55 lines (39 loc) · 1.54 KB
/
in_docker.mk
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
45
46
47
48
49
50
51
52
53
54
55
include ./args.mk
# ===================================================
# setup
# ===================================================
setup_npm:
npm install --unsafe-perm
setup_bundler:
bundle install --path vendor/bundle
setup_plantuml_jar:
wget https://jaist.dl.sourceforge.net/project/plantuml/plantuml.jar -O ./articles/plantuml.jar
# ===================================================
# status check
# ===================================================
status_check_url:
@chmod -x ./docker_env/status_check.sh
@/bin/sh ./docker_env/status_check.sh $(URL)
status_check/review:
@$(MAKE) status_check_url -f in_docker.mk URL=http://0.0.0.0:8989/
status_check/vivliostyle:
@$(MAKE) status_check_url -f in_docker.mk URL=http://0.0.0.0:8000/
status_check: status_check/review status_check/vivliostyle
# ===================================================
# create command
# ===================================================
init:
rm -rf ./articles
review-init articles
html:
cd articles/ && review-preproc --replace *.re && review-epubmaker config.yml && review-epub2html book.epub | bundle exec ruby ../scripts/html-ext.rb > book.html
@$(MAKE) status_check -f in_docker.mk --no-print-directory
pdf: html
node ./scripts/pdf.js $(PDF) $(HTML_URL) $(PAGE_FORMAT)
# ===================================================
# lint
# ===================================================
lint:
npx textlint $(TEXTLINT_OPTIONS) $(LINT_TARGET_FILES)
lint/fix:
$(MAKE) lint -f in_docker.mk TEXTLINT_OPTIONS=--fix LINT_TARGET_FILES='$(LINT_TARGET_FILES)'