-
Notifications
You must be signed in to change notification settings - Fork 0
/
.README.md.bud
42 lines (38 loc) · 954 Bytes
/
.README.md.bud
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
/**
* Bud file for README.md
*/
'use strict'
const apeTmpl = require('ape-tmpl')
const apeDoc = require('ape-doc')
const pkg = require('./package.json')
const aglob = require('aglob')
module.exports = apeTmpl.readmeMdBud({
pkg: pkg,
repo: pkg.repository,
sections: 'doc/guides/*.md.hbs',
badges: {
travis: true,
npm: true,
standard: true
},
overview: 'doc/overview.md',
links: require('./doc/links'),
vars: {
bannerHeight: 40,
funcs: aglob.sync('lib/*.js')
.filter((filename) => !/index\.js$/.test(filename))
.map((filename) => {
let [ comments ] = apeDoc.commentsInFile(filename)
let [ func ] = comments.function
return {
name: func.name,
description: comments.description,
params: comments.param,
returns: comments.returns && comments.returns[ 0 ]
}
})
}
})
if (!module.parent) {
require('coz').render(__filename)
}