Skip to content

Commit d7b089f

Browse files
Merge pull request #2 from CyberAgentGameEntertainment/feature/tuning_bible
Add Articles
2 parents 6a0341f + e83fcf9 commit d7b089f

File tree

389 files changed

+24223
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

389 files changed

+24223
-1
lines changed

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
node_modules/
2+
Gemfile.lock
3+
.sass-cache/
4+
5+
articles/*.pdf
6+
articles/*.epub
7+
articles/*.html
8+
# articles/*.md
9+
articles/*.xml
10+
articles/*.txt
11+
12+
.DS_Store

Documentation/bible_logo.png

80.5 KB
Loading

Gemfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# A sample Gemfile
2+
source "https://rubygems.org"
3+
4+
gem 'review', '5.3.0'
5+
gem 'pandoc2review'
6+
gem 'rake'
7+
# gem 'review-peg', '0.2.2'

Gruntfile.js

Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
"use strict";
2+
3+
let fs = require("fs");
4+
let yaml = require("js-yaml");
5+
6+
const articles = "articles";
7+
const bookConfig = yaml.safeLoad(fs.readFileSync(`${articles}/config.yml`, "utf8"));
8+
9+
const reviewPrefix = process.env["REVIEW_PREFIX"] || "bundle exec ";
10+
const reviewPostfix = process.env["REVIEW_POSTFIX"] || ""; // REVIEW_POSTFIX="-peg" npm run pdf とかするとPEGでビルドできるよ
11+
const reviewConfig = process.env["REVIEW_CONFIG_FILE"] || "config.yml"; // REVIEW_CONFIG_FILE="config-ebook.yml" npm run pdf のようにすると別のconfigでビルドできるよ
12+
const reviewPreproc = `${reviewPrefix}review-preproc${reviewPostfix}`;
13+
const reviewCompile = `${reviewPrefix}review-compile${reviewPostfix}`;
14+
const reviewPdfMaker = `${reviewPrefix}rake pdf ${reviewPostfix}`;
15+
const reviewEpubMaker = `${reviewPrefix}rake epub ${reviewPostfix}`;
16+
const reviewWebMaker = `${reviewPrefix}rake web ${reviewPostfix}`;
17+
const reviewTextMaker = `${reviewPrefix}rake text ${reviewPostfix}`;
18+
const reviewIDGXMLMaker = `${reviewPrefix}rake idgxml ${reviewPostfix}`;
19+
const reviewVivliostyle = `${reviewPrefix}rake vivliostyle ${reviewPostfix}`;
20+
21+
module.exports = grunt => {
22+
grunt.initConfig({
23+
clean: {
24+
review: {
25+
src: [
26+
`${articles}/${bookConfig.bookname}-*/`, // pdf, epub temp dir
27+
`${articles}/*.pdf`,
28+
`${articles}/*.epub`,
29+
`${articles}/*.html`,
30+
`${articles}/*.md`,
31+
`${articles}/*.xml`,
32+
`${articles}/*.txt`,
33+
`${articles}/webroot`
34+
]
35+
}
36+
},
37+
shell: {
38+
preprocess: {
39+
options: {
40+
execOptions: {
41+
cwd: articles,
42+
}
43+
},
44+
command: `${reviewPreproc} -r --tabwidth=2 **/*.re`
45+
},
46+
compile2text: {
47+
options: {
48+
execOptions: {
49+
cwd: articles,
50+
}
51+
},
52+
command: `${reviewTextMaker}`
53+
},
54+
compile2markdown: {
55+
options: {
56+
execOptions: {
57+
cwd: articles,
58+
}
59+
},
60+
command: `${reviewCompile} --target=markdown`
61+
},
62+
compile2html: {
63+
options: {
64+
execOptions: {
65+
cwd: articles,
66+
}
67+
},
68+
command: `${reviewCompile} --target=html --stylesheet=style.css --chapterlink`
69+
},
70+
compile2latex: {
71+
options: {
72+
execOptions: {
73+
cwd: articles,
74+
}
75+
},
76+
command: `${reviewCompile} --target=latex --footnotetext`
77+
},
78+
compile2idgxml: {
79+
options: {
80+
execOptions: {
81+
cwd: articles,
82+
}
83+
},
84+
command: `${reviewCompile} --target=idgxml`
85+
},
86+
compile2pdf: {
87+
options: {
88+
execOptions: {
89+
cwd: articles,
90+
}
91+
},
92+
command: `${reviewPdfMaker}`
93+
},
94+
compile2epub: {
95+
options: {
96+
execOptions: {
97+
cwd: articles,
98+
}
99+
},
100+
command: `${reviewEpubMaker}`
101+
},
102+
compile2web: {
103+
options: {
104+
execOptions: {
105+
cwd: articles,
106+
}
107+
},
108+
command: `${reviewWebMaker}`
109+
},
110+
compile2idgxmlmaker: {
111+
options: {
112+
execOptions: {
113+
cwd: articles,
114+
}
115+
},
116+
command: `${reviewIDGXMLMaker}`
117+
},
118+
compile2vivliostyle: {
119+
options: {
120+
execOptions: {
121+
cwd: articles,
122+
}
123+
},
124+
command: `${reviewVivliostyle}`
125+
}
126+
}
127+
});
128+
129+
function generateTask(target) {
130+
return ["clean", "shell:preprocess", `shell:compile2${target}`];
131+
}
132+
133+
grunt.registerTask(
134+
"default",
135+
"原稿をコンパイルしてPDFファイルにする",
136+
"pdf");
137+
138+
grunt.registerTask(
139+
"text",
140+
"原稿をコンパイルしてTextファイルにする",
141+
generateTask("text"));
142+
143+
grunt.registerTask(
144+
"markdown",
145+
"原稿をコンパイルしてMarkdownファイルにする",
146+
generateTask("markdown"));
147+
148+
grunt.registerTask(
149+
"html",
150+
"原稿をコンパイルしてHTMLファイルにする",
151+
generateTask("html"));
152+
153+
grunt.registerTask(
154+
"idgxmlmaker",
155+
"原稿をコンパイルしてInDesign用XMLファイルにする",
156+
generateTask("idgxmlmaker"));
157+
158+
grunt.registerTask(
159+
"pdf",
160+
"原稿をコンパイルしてLaTeXでpdfファイルにする",
161+
generateTask("pdf"));
162+
163+
grunt.registerTask(
164+
"epub",
165+
"原稿をコンパイルしてepubファイルにする",
166+
generateTask("epub"));
167+
168+
grunt.registerTask(
169+
"web",
170+
"原稿をコンパイルしてWebページファイルにする",
171+
generateTask("web"));
172+
173+
grunt.registerTask(
174+
"vivliostyle",
175+
"原稿をコンパイルしてVivliostyle-CLIでpdfファイルにする",
176+
generateTask("vivliostyle"));
177+
178+
require('load-grunt-tasks')(grunt);
179+
};

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,17 @@
1-
# UnityPerformanceTuningBible
1+
<p align="center">
2+
<img width=350 src="Documentation/bible_logo.png" alt="UnityPerformanceTuningBible">
3+
</p>
4+
5+
# Unity Performance Tuning Bible
6+
本書はUnityのパフォーマンスチューニングに関するノウハウを体系的にまとめた書籍です。
7+
本リポジトリから電子書籍をPDFとしてダウンロードすることができます。
8+
9+
ご意見、ご指摘は [Issues](https://github.com/CyberAgentGameEntertainment/UnityPerformanceTuningBible/issues)[Pull Requests](https://github.com/CyberAgentGameEntertainment/UnityPerformanceTuningBible/pulls) からお願いいたします。
10+
11+
## 電子書籍のダウンロード方法
12+
1. [Releasesの最新版](https://github.com/CyberAgentGameEntertainment/UnityPerformanceTuningBible/releases/latest)へ遷移します。
13+
14+
2. AssetsからPDFをダウンロードします。
15+
16+
## Copyright
17+
(C) 2022 CyberAgent, Inc.

0 commit comments

Comments
 (0)