feat(react): update to react 18

This commit is contained in:
Bastian Ike
2022-05-13 12:49:09 +02:00
committed by Bastian
parent f4c5c9edec
commit f28aad8bcb
35 changed files with 27496 additions and 16761 deletions

18
dist_scripts/scripts/createStaticFiles.js Normal file → Executable file
View File

@@ -55,22 +55,22 @@ process.on("unhandledRejection", function (err) {
case 0:
_a.trys.push([0, 2, , 3]);
console.log("starting static");
return [4 /*yield*/, radar_1.createRadar()];
return [4 /*yield*/, (0, radar_1.createRadar)()];
case 1:
radar = _a.sent();
fs_1.copyFileSync("build/index.html", "build/overview.html");
fs_1.copyFileSync("build/index.html", "build/help-and-about-tech-radar.html");
rawConf = fs_1.readFileSync("build/config.json", "utf-8");
(0, fs_1.copyFileSync)("build/index.html", "build/overview.html");
(0, fs_1.copyFileSync)("build/index.html", "build/help-and-about-tech-radar.html");
rawConf = (0, fs_1.readFileSync)("build/config.json", "utf-8");
config = JSON.parse(rawConf);
Object.keys(config.quadrants).forEach(function (quadrant) {
var destFolder = "build/" + quadrant;
fs_1.copyFileSync("build/index.html", destFolder + ".html");
if (!fs_1.existsSync(destFolder)) {
fs_1.mkdirSync(destFolder);
var destFolder = "build/".concat(quadrant);
(0, fs_1.copyFileSync)("build/index.html", "".concat(destFolder, ".html"));
if (!(0, fs_1.existsSync)(destFolder)) {
(0, fs_1.mkdirSync)(destFolder);
}
});
radar.items.forEach(function (item) {
fs_1.copyFileSync("build/index.html", "build/" + item.quadrant + "/" + item.name + ".html");
(0, fs_1.copyFileSync)("build/index.html", "build/".concat(item.quadrant, "/").concat(item.name, ".html"));
});
console.log("created static files.");
return [3 /*break*/, 3];