/
EvilBeaver
/
OneScript
Обзор
Документация
Войти
/
EvilBeaver
/
OneScript
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
develop
src/OneScriptDocumenter/Cli/MarkdownGenerator.cs
41 строка
1 KB
EvilBeaver
Новый документер для нового сайта
30 апр 2025, 00:08
30 апр 2025, 00:08
d0d65e0
Код
Авторство
О чём код?
/*---------------------------------------------------------- This Source Code Form is subject to the terms of the Mozilla Public License, v.2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ----------------------------------------------------------*/ using System.IO; using OneScript.Commons; using OneScriptDocumenter.Model; using OneScriptDocumenter.Secondary; namespace OneScriptDocumenter.Cli { public class MarkdownGenerator { private readonly DocumentationModel _documentation; private readonly ReferenceFactory _referenceFactory; public MarkdownGenerator(DocumentationModel documentation, ReferenceFactory referenceFactory) { _documentation = documentation; _referenceFactory = referenceFactory; } public void Write(string outputDir) { ConsoleLogger.Info("Generating markdown output"); var walkers = new BaseModelVisitor[] { new MainIndexWriter(outputDir, _referenceFactory), new TocPagesGenerator(outputDir, _referenceFactory), new DocumentWriter(outputDir), new VitepressSidebarGenerator(Path.Combine(outputDir, "vitepress-toc.json"), _referenceFactory) }; walkers.ForEach(w => w.VisitModel(_documentation)); } } }