fix
This commit is contained in:
21
book/node_modules/honkit/lib/parse/lookupStructureFile.js
generated
vendored
Normal file
21
book/node_modules/honkit/lib/parse/lookupStructureFile.js
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const findParsableFile_1 = __importDefault(require("./findParsableFile"));
|
||||
/**
|
||||
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<File | Undefined>} The path of the file found, relative
|
||||
to the book content root.
|
||||
*/
|
||||
function lookupStructureFile(book, type) {
|
||||
const config = book.getConfig();
|
||||
const fileToSearch = config.getValue(["structure", type]);
|
||||
return (0, findParsableFile_1.default)(book, fileToSearch);
|
||||
}
|
||||
exports.default = lookupStructureFile;
|
Reference in New Issue
Block a user