forked from cutenode/good-first-issue
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmarkdown.config.js
More file actions
33 lines (30 loc) · 768 Bytes
/
markdown.config.js
File metadata and controls
33 lines (30 loc) · 768 Bytes
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
const path = require('path')
const TABLE_HEADER = `
| Order | Name | Project \`<project>\` | Description |
| --- | --- | --- | --- |
`.trim()
module.exports = {
transforms: {
PROJECTS (content, options) {
const { path: filePath } = options
const projects = require(path.resolve(filePath))
const list = Object.keys(projects)
.map((name, index) => {
const project = projects[name]
const description = projects[name].description
return [
'',
`${index + 1}.`,
project.name,
`\`${name}\``,
`${description}`,
''
].join('|')
})
return [
TABLE_HEADER,
list.join('\n')
].join('\n')
}
}
}