This commit is contained in:
2025-05-12 05:38:44 +09:00
parent dced21c3f8
commit 6d78bfa46e
8120 changed files with 1161564 additions and 0 deletions

View 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;