This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import playwright from "playwright"; | |
import fs from "fs"; | |
import pretty from "pretty"; | |
import * as cheerio from "cheerio"; | |
import path from "path"; | |
const saveFolder = "generated"; | |
async function saveFile(filename, content) { | |
try { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Constants { | |
public static String TITLE; | |
public static int STANDARD_STATES_WIDTH; | |
public static int STANDARD_STATES_HEIGHT; | |
public static Color BUTTON_COLOR_1; | |
static void init(Setting setting){ | |
TITLE = setting.getTITLE(); | |
STANDARD_STATES_WIDTH = setting.getSTANDARD_STATES_WIDTH(); | |
STANDARD_STATES_HEIGHT = setting.getSTANDARD_STATES_HEIGHT(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Setting { | |
private String TITLE; | |
private int STANDARD_STATES_WIDTH; | |
private int STANDARD_STATES_HEIGHT; | |
private Color BUTTON_COLOR_1; | |
void setColor(String name, Color color){ | |
switch (name){ | |
case "Constants.BUTTON_COLOR_1": BUTTON_COLOR_1 = color; | |
break; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SettingLoader { | |
private static SettingLoader settingLoader; | |
private SettingLoader(){} | |
public static SettingLoader getInstance(){ | |
if (settingLoader == null) settingLoader = new SettingLoader(); | |
return settingLoader; | |
} | |
public Setting loadSetting(String address) throws FileNotFoundException, XMLStreamException { | |
FileInputStream xmlFile = new FileInputStream(address); |