Scripts: small fixes

This commit is contained in:
Pieter Vander Vennet 2023-08-10 15:36:32 +02:00
parent 7a95334882
commit f511423845
2 changed files with 6 additions and 6 deletions

View file

@ -10,7 +10,6 @@ import Title from "../src/UI/Base/Title"
import QueryParameterDocumentation from "../src/UI/QueryParameterDocumentation" import QueryParameterDocumentation from "../src/UI/QueryParameterDocumentation"
import ScriptUtils from "./ScriptUtils" import ScriptUtils from "./ScriptUtils"
import List from "../src/UI/Base/List" import List from "../src/UI/Base/List"
import SharedTagRenderings from "../src/Customizations/SharedTagRenderings"
import Translations from "../src/UI/i18n/Translations" import Translations from "../src/UI/i18n/Translations"
import themeOverview from "../src/assets/generated/theme_overview.json" import themeOverview from "../src/assets/generated/theme_overview.json"
import LayoutConfig from "../src/Models/ThemeConfig/LayoutConfig" import LayoutConfig from "../src/Models/ThemeConfig/LayoutConfig"
@ -27,6 +26,7 @@ import ThemeViewState from "../src/Models/ThemeViewState"
import Validators from "../src/UI/InputElement/Validators" import Validators from "../src/UI/InputElement/Validators"
import questions from "../src/assets/generated/layers/questions.json" import questions from "../src/assets/generated/layers/questions.json"
import { LayerConfigJson } from "../src/Models/ThemeConfig/Json/LayerConfigJson" import { LayerConfigJson } from "../src/Models/ThemeConfig/Json/LayerConfigJson"
function WriteFile( function WriteFile(
filename, filename,
html: BaseUIElement, html: BaseUIElement,
@ -384,11 +384,11 @@ WriteFile("./Docs/BuiltinQuestions.md", qLayer.GenerateDocumentation([], new Map
} }
} }
for (const usedBuiltin of usedBuiltins) { for (const usedBuiltin of usedBuiltins) {
var using = layersUsingBuiltin.get(usedBuiltin) const usingLayers = layersUsingBuiltin.get(usedBuiltin)
if (using === undefined) { if (usingLayers === undefined) {
layersUsingBuiltin.set(usedBuiltin, [layer.id]) layersUsingBuiltin.set(usedBuiltin, [layer.id])
} else { } else {
using.push(layer.id) usingLayers.push(layer.id)
} }
} }
@ -409,7 +409,7 @@ WriteFile("./Docs/URL_Parameters.md", QueryParameterDocumentation.GenerateQueryP
"src/Logic/Web/QueryParameters.ts", "src/Logic/Web/QueryParameters.ts",
"src/UI/QueryParameterDocumentation.ts", "src/UI/QueryParameterDocumentation.ts",
]) ])
if (fakedom === undefined || window === undefined) { if (fakedom === undefined) {
throw "FakeDom not initialized" throw "FakeDom not initialized"
} }
QueryParameters.GetQueryParameter( QueryParameters.GetQueryParameter(

View file

@ -1,5 +1,5 @@
import ScriptUtils from "./ScriptUtils" import ScriptUtils from "./ScriptUtils"
import { Utils } from "../Utils" import { Utils } from "../src/Utils"
import * as fs from "fs" import * as fs from "fs"
async function main(args: string[]) { async function main(args: string[]) {