-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.js
30 lines (25 loc) · 905 Bytes
/
index.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
var choo = require('choo')
var app = choo()
app.model(require('./models/app'))
app.model(require('./models/docs'))
app.model(require('./models/examples'))
app.model(require('./models/comparisons'))
app.router(function (route) {
return [
route('/', require('./views/main')),
route('/api', require('./views/api')),
route('/comparisons', require('./views/comparisons')),
route('/examples', require('./views/examples'))
]}
)
var tree = app.start({ href: false })
document.body.appendChild(tree)
var fs = require('fs')
var path = require('path')
var insertcss = require('insert-css')
var basecss = fs.readFileSync(path.join(__dirname, 'style.css'))
var markdowncss = fs.readFileSync(path.join(__dirname, 'lib', 'markdown-style.css'))
var highlightcss = fs.readFileSync(path.join(__dirname, 'lib', 'tomorrow-night.css'))
insertcss(basecss)
insertcss(markdowncss)
insertcss(highlightcss)