Parse a structure file (ex: SUMMARY.md, GLOSSARY.md). It uses the configuration to find the specified file. @param {Book} book @param {String} type: one of ["glossary", "readme", "summary"] @return {Promise }
(book, type)
| 54 | @return {Promise<List|Map>} |
| 55 | */ |
| 56 | function parseStructureFile(book, type) { |
| 57 | var fs = book.getContentFS(); |
| 58 | |
| 59 | return lookupStructureFile(book, type) |
| 60 | .then(function(file) { |
| 61 | if (!file) return [undefined, undefined]; |
| 62 | |
| 63 | return parseFile(fs, file, type); |
| 64 | }); |
| 65 | } |
| 66 | |
| 67 | module.exports = parseStructureFile; |
no test coverage detected
searching dependent graphs…