Skip to content

Commit 9e8fd33

Browse files
committed
grunt htmlの出力結果にcssがあたるようにした
1 parent be700ad commit 9e8fd33

File tree

2 files changed

+20
-22
lines changed

2 files changed

+20
-22
lines changed

Gruntfile.js

+7-16
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ module.exports = function (grunt) {
8080
review: {
8181
src: [
8282
'articles/c87-typescript-pdf/',
83-
'articles/*.pdf'
83+
'articles/*.pdf',
84+
'articles/*.epub',
85+
'articles/*.html'
8486
]
8587
}
8688
},
@@ -100,25 +102,25 @@ module.exports = function (grunt) {
100102
compile2text: {
101103
cwd: "./articles",
102104
cmd: function () {
103-
return "bundle exec review-compile --all --target=text";
105+
return "bundle exec review-compile --all --target=text --footnotetext --stylesheet=style.css";
104106
}
105107
},
106108
compile2html: {
107109
cwd: "./articles",
108110
cmd: function () {
109-
return "bundle exec review-compile --all --target=html";
111+
return "bundle exec review-compile --all --target=html --footnotetext --stylesheet=style.css";
110112
}
111113
},
112114
compile2latex: {
113115
cwd: "./articles",
114116
cmd: function () {
115-
return "bundle exec review-compile --all --target=latex";
117+
return "bundle exec review-compile --all --target=latex --footnotetext --stylesheet=style.css";
116118
}
117119
},
118120
compile2idgxml: {
119121
cwd: "./articles",
120122
cmd: function () {
121-
return "bundle exec review-compile --all --target=idgxml";
123+
return "bundle exec review-compile --all --target=idgxml --footnotetext --stylesheet=style.css";
122124
}
123125
},
124126
compile2pdf: {
@@ -132,12 +134,6 @@ module.exports = function (grunt) {
132134
cmd: function () {
133135
return "bundle exec review-epubmaker config.yml";
134136
}
135-
},
136-
checkWithTsc: {
137-
cwd: "./articles",
138-
cmd: function () {
139-
return "bundle exec review-compile --all --target=html tsc-check";
140-
}
141137
}
142138
}
143139
});
@@ -151,11 +147,6 @@ module.exports = function (grunt) {
151147
"原稿をコンパイルしてPDFファイルにする",
152148
"pdf");
153149

154-
grunt.registerTask(
155-
'check',
156-
"原稿に含まれるTypeScriptコードをtscに食わせてチェックする",
157-
"exec:checkWithTsc");
158-
159150
grunt.registerTask(
160151
'text',
161152
"原稿をコンパイルしてTextファイルにする",

articles/config.yml

+13-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# review-epubmaker向けの設定ファイルの例。
2-
# yamlファイルをReVIEWファイルのある場所に置き
2+
# yamlファイルをRe:VIEWファイルのある場所に置き
33
# 「review-epubmaker yamlファイル」を実行すると、<bookname>.epubファイルが
44
# 生成されます。
55
# このファイルはUTF-8エンコーディングで記述してください。
@@ -8,13 +8,16 @@
88

99
# ブック名(ファイル名になるもの。ASCII範囲の文字を使用)
1010
bookname: typescript-in-definitelyland
11+
# 記述言語
12+
language: ja
1113
# 書名
12-
booktitle: TypeScript in Definitelyland
14+
title: TypeScript in Definitelyland
1315
# 著者
1416
aut: vvakame
1517
prt: TechBooster
1618
prt_url: http://techbooster.org/
1719
edt: mhidaka
20+
# 刊行日。YYYY-MM-DD形式。省略した場合は本日の日付
1821
date: 2014-12-30
1922
rights: |
2023
(C) 2014 vvakame
@@ -38,7 +41,7 @@ description:
3841
# 固有IDに使用するドメイン
3942
urnid: http://typescript.ninja/typescript-in-definitelyland/
4043
# CSSファイル (yamlファイルおよびReVIEWファイルを置いたディレクトリにあること
41-
stylesheet: style.css
44+
stylesheet: ["style.css"]
4245
# LaTeX用のスタイルファイル(styディレクトリ以下に置くこと)
4346
texstyle: techbooster-doujin
4447
# LaTeX用のdocumentclassを指定する
@@ -64,11 +67,15 @@ colophon: true
6467
# EPUBで表紙をコンテンツに含めるか。デフォルトでは作成されない。yesにするとiBooks等でも最初に表紙が表示されるようになる
6568
cover_linear: null
6669
# review-compileに渡すパラメータ
67-
params: --stylesheet=sample.css
70+
params: --stylesheet=style.css
6871
# デバッグフラグ。nullでないときには一時ファイルをカレントディレクトリに作成し、削除もしない
6972
debug: null
7073
# 子ビルダに渡すパラメータ
7174
params:
7275

73-
pubhistory: |
74-
2014年12月30日 初版発行 v1.0.0
76+
# 発行年月。YYYY-MM-DD形式による配列指定。省略した場合はdateを使用する
77+
# 複数指定する場合は次のように記述する
78+
# [["初版第第1刷の日付", "初版第第2刷の日付"], ["第2版第1刷の日付"]]
79+
# 日付の後ろを空白文字で区切り、任意の文字列を置くことも可能。
80+
history:
81+
- ["2014年12月30日 初版発行 v1.0.0"]

0 commit comments

Comments
 (0)