blob: 2fe54940795d696591040713d8d7acd7fdf59884 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
import { loadOptions, stripNixStore } from "easy-nix-documentation/loader"
export default {
async load() {
const optionsJSON = process.env.MNW_OPTIONS_JSON
if (optionsJSON === undefined) {
console.log("MNW_OPTIONS_JSON is undefined");
exit(1)
}
return await loadOptions(optionsJSON, {
include: [/^(?!.*_module)/],
mapDeclarations: declaration => {
const relDecl = stripNixStore(declaration);
return `<a href="https://github.com/Gerg-L/mnw/tree/master/${relDecl}"><mnw/${relDecl}></a>`
},
})
}
}
|