-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.js
43 lines (40 loc) · 1.18 KB
/
build.js
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
const fs = require("fs")
const page = slidesMd => `
<!DOCTYPE html>
<html>
<head>
<title>Async Iteration</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="static/css/remark-custom-theme.css">
<link rel="stylesheet" type="text/css" href="static/css/remark-custom-extra.css">
<link rel="stylesheet" type="text/css" href="static/css/svg-custom.css">
</head>
<body>
<textarea id="source">
${slidesMd}
</textarea>
<script src="static/js/remark-latest.min.js">
</script>
<script>
remark.create({
ratio: '16:9',
highlightStyle: 'github',
highlightLanguage: 'javascript',
highlightLines: true,
navigation: {
scroll: false
}
})
</script>
<script src="static/js/jsbin-embed-4.1.3.min.js"></script>
<script>
window.techio = window.location.search.indexOf('techio') !== -1
</script>
<script src="static/js/jsbin-links.js"></script>
<script src="static/js/techio-links.js"></script>
<script src="static/js/sequence.js"></script>
</body>
</html>
`;
const md = fs.readFileSync(process.argv[2])
fs.writeFileSync("docs/index.html", page(md))