2021-03-13 19:07:11 +01:00
|
|
|
import {Utils} from "../Utils";
|
2021-03-24 02:01:04 +01:00
|
|
|
Utils.runningFromConsole = true;
|
2021-03-13 19:07:11 +01:00
|
|
|
import SpecialVisualizations from "../UI/SpecialVisualizations";
|
2021-03-24 01:25:57 +01:00
|
|
|
import {writeFileSync} from "fs";
|
2021-03-22 01:06:24 +01:00
|
|
|
import {UIElement} from "../UI/UIElement";
|
2021-03-24 01:25:57 +01:00
|
|
|
import SimpleMetaTagger from "../Logic/SimpleMetaTagger";
|
2021-03-24 02:01:04 +01:00
|
|
|
import Combine from "../UI/Base/Combine";
|
2021-03-25 15:19:44 +01:00
|
|
|
import {ExtraFunction} from "../Logic/ExtraFunction";
|
2021-05-11 02:39:51 +02:00
|
|
|
import ValidatedTextField from "../UI/Input/ValidatedTextField";
|
2021-03-24 02:01:04 +01:00
|
|
|
|
2021-03-24 01:25:57 +01:00
|
|
|
|
2021-03-13 19:07:11 +01:00
|
|
|
|
|
|
|
|
2021-03-22 01:06:24 +01:00
|
|
|
const TurndownService = require('turndown')
|
|
|
|
|
|
|
|
function WriteFile(filename, html: UIElement) : void {
|
|
|
|
const md = new TurndownService().turndown(html.InnerRender());
|
|
|
|
writeFileSync(filename, md);
|
|
|
|
}
|
|
|
|
|
|
|
|
WriteFile("./Docs/SpecialRenderings.md", SpecialVisualizations.HelpMessage)
|
2021-03-24 02:01:04 +01:00
|
|
|
WriteFile("./Docs/CalculatedTags.md", new Combine([SimpleMetaTagger.HelpText(), ExtraFunction.HelpText()]))
|
2021-05-11 02:39:51 +02:00
|
|
|
writeFileSync("./Docs/SpecialInputElements", ValidatedTextField.HelpText());
|
2021-03-22 01:06:24 +01:00
|
|
|
console.log("Generated docs")
|
|
|
|
|