📄 Reformat typescript with 2-Space

This commit is contained in:
ful1e5 2021-03-24 17:15:35 +05:30
parent 3beabbcbc0
commit 28614dfc25
17 changed files with 395 additions and 390 deletions

View file

@ -1,8 +1,8 @@
import { Colors } from "bibata-core/src/types";
interface Config {
themeName: string;
color: Colors;
themeName: string;
color: Colors;
}
const black = "#000000";
@ -11,30 +11,30 @@ const amber = "#FF8300";
const richBlack = "#001524";
const config: Config[] = [
{
themeName: "Bibata-Modern-Amber",
color: {
base: amber,
outline: white,
watch: {
background: richBlack,
},
},
},
{
themeName: "Bibata-Modern-Classic",
color: {
base: black,
outline: white,
},
},
{
themeName: "Bibata-Modern-Ice",
color: {
base: white,
outline: black,
},
},
{
themeName: "Bibata-Modern-Amber",
color: {
base: amber,
outline: white,
watch: {
background: richBlack,
},
},
},
{
themeName: "Bibata-Modern-Classic",
color: {
base: black,
outline: white,
},
},
{
themeName: "Bibata-Modern-Ice",
color: {
base: white,
outline: black,
},
},
];
export { config };

View file

@ -7,31 +7,31 @@ const root = path.resolve(__dirname, "../../../../");
const svgDir = path.resolve(root, "svg", "modern");
const main = async () => {
for (const { themeName, color } of config) {
console.log("=>", themeName);
for (const { themeName, color } of config) {
console.log("=>", themeName);
const bitmapsDir = path.resolve(root, "bitmaps", themeName);
const svg = new SVGHandler.SvgDirectoryParser(svgDir);
const bitmapsDir = path.resolve(root, "bitmaps", themeName);
const svg = new SVGHandler.SvgDirectoryParser(svgDir);
const png = new BitmapsGenerator(bitmapsDir);
const browser = await png.getBrowser();
const png = new BitmapsGenerator(bitmapsDir);
const browser = await png.getBrowser();
for (let { key, content } of svg.getStatic()) {
console.log(" -> Saving", key, "...");
for (let { key, content } of svg.getStatic()) {
console.log(" -> Saving", key, "...");
content = SVGHandler.colorSvg(content, color);
await png.generateStatic(browser, content, key);
}
content = SVGHandler.colorSvg(content, color);
await png.generateStatic(browser, content, key);
}
for (let { key, content } of svg.getAnimated()) {
console.log(" -> Saving", key, "...");
for (let { key, content } of svg.getAnimated()) {
console.log(" -> Saving", key, "...");
content = SVGHandler.colorSvg(content, color);
await png.generateAnimated(browser, content, key);
}
content = SVGHandler.colorSvg(content, color);
await png.generateAnimated(browser, content, key);
}
await browser.close();
}
await browser.close();
}
};
main();