Skip to content
This repository was archived by the owner on Oct 16, 2024. It is now read-only.

Commit 59f7e29

Browse files
committed
小テストのサポート
1 parent fe5baac commit 59f7e29

File tree

6 files changed

+24
-15
lines changed

6 files changed

+24
-15
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/docs/tmp
22
/slide/*.key
3+
quiz

Makefile

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
.SUFFIXES: .html .md .pdf
44
.DEFAULT: html
5-
all: html note
5+
all: html note quiz
66

77
BASE := localhost:8082
88

@@ -14,6 +14,9 @@ PDF := $(addprefix docs/pdf/, $(addsuffix .pdf, $(SLIDES)))
1414
NOTES := $(basename $(notdir $(wildcard note/*.md)))
1515
NOTEHTML := $(addprefix docs/note/, $(addsuffix .html, $(NOTES)))
1616

17+
QUIZ := $(basename $(notdir $(wildcard quiz/*.md)))
18+
QUIZHTML := $(addprefix docs/quiz/, $(addsuffix .html, $(QUIZ)))
19+
1720
clean:
1821
rm -f $(HTML_TMP) $(HTML) $(NOTES) $(PDF)
1922

@@ -49,15 +52,6 @@ docs/html/%.html: $(HTML_DEV) slide/%.md
4952
@phantomjs docs/dev/phantom.js $(slide) $(html2)
5053
@echo
5154

52-
pdf: $(PDF)
53-
54-
pdf/%.pdf: docs/%.html
55-
$(eval slide := $(basename $(notdir $@)))
56-
$(eval pdf := $(addprefix docs/pdf/, $(addsuffix .pdf, $(slide))))
57-
$(eval url := $(addprefix http://$(BASE)/, $(addsuffix .html, $(slide))))
58-
59-
decktape $(url) $(pdf)
60-
6155
note: $(NOTEHTML)
6256
docs/note/%.html: note/%.md
6357
$(eval note := $(basename $(notdir $@)))
@@ -70,6 +64,17 @@ docs/note/%.html: note/%.md
7064
--highlight-style=espresso \
7165
--smart
7266

67+
quiz: $(QUIZHTML)
68+
docs/quiz/%.html: quiz/%.md
69+
$(eval quiz := $(basename $(notdir $@)))
70+
$(eval md := $(addprefix quiz/, $(addsuffix .md, $(quiz))))
71+
$(eval html := $(addprefix docs/quiz/, $(addsuffix .html, $(quiz))))
72+
pandoc $(md) \
73+
--include-in-header=docs/dev/quiz.header \
74+
--standalone --to=html --output=$(html) \
75+
--highlight-style=monochrome \
76+
--smart
77+
7378
server:
7479
@wget --quiet --spider "http://$(BASE)/" || (cd docs; php -S $(BASE) &)
7580

docs/dev/kw.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,7 @@ code.sourceCode {
1919
font-weight: 500;
2020
line-height: 1.5;
2121
}
22+
23+
.quiz li {
24+
padding-bottom: 10ex;
25+
}

docs/dev/quiz.header

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<link ref="stylesheet" type="text/css" href="../lib/reveal.js-3.5.0/css/theme/solarized.css">
2+
<link rel="stylesheet" type="text/css" href="../dev/kw.css">
3+
<script src="//use.edgefonts.net/source-code-pro.js"></script>

docs/note/makefile.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ <h3 class="date">2017年9月26日</h3>
9393
22
9494
23
9595
24
96-
25
9796
</pre></td><td class="sourceCode"><pre><code class="sourceCode makefile"><span class="co"># lx01/src/Makefile</span>
9897

9998
<span class="dv">all:</span><span class="dt"> simple simple.s Simple.class</span>
@@ -117,8 +116,7 @@ <h3 class="date">2017年9月26日</h3>
117116
scala Simple
118117

119118
<span class="dv">run-j:</span>
120-
java -classpath `brew --prefix`/opt/scala/libexec/lib/scala-library.jar:. Simple
121-
</code></pre></td></tr></table></div>
119+
java -classpath `brew --prefix`/opt/scala/libexec/lib/scala-library.jar:. Simple</code></pre></td></tr></table></div>
122120
<p>まず,わかりやすいところで5-6行目を見てみましょう.ここには,以下のことが記述されています.</p>
123121
<ul>
124122
<li><p><code>simple</code> という目的ファイルが <code>simple.c</code> というファイルから構成されること</p></li>

note/makefile.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ run-s:
5555

5656
run-j:
5757
java -classpath `brew --prefix`/opt/scala/libexec/lib/scala-library.jar:. Simple
58-
59-
6058
~~~
6159

6260
まず,わかりやすいところで5-6行目を見てみましょう.ここには,以下のことが記述されています.

0 commit comments

Comments
 (0)