Lookup a structure file (ex: SUMMARY.md, GLOSSARY.md) in a book. Uses book's config to find it. @param {Book} book @param {String} type: one of ["glossary", "readme", "summary", "langs"] @return {Promise } The path of the file found, relative to the book content
(book, type)
| 10 | to the book content root. |
| 11 | */ |
| 12 | function lookupStructureFile(book, type) { |
| 13 | var config = book.getConfig(); |
| 14 | |
| 15 | var fileToSearch = config.getValue(['structure', type]); |
| 16 | |
| 17 | return findParsableFile(book, fileToSearch); |
| 18 | } |
| 19 | |
| 20 | module.exports = lookupStructureFile; |
no test coverage detected
searching dependent graphs…