style: reformat after editorconfig change

This commit is contained in:
winston 2022-12-29 20:29:09 +01:00
parent a04bd7869c
commit ec883a880b
No known key found for this signature in database
GPG key ID: 3786770EDBC2B481

View file

@ -4,26 +4,26 @@ import { createSwatchesFile } from "npm:procreate-swatches";
const capitalize = (str: string) => str[0].toUpperCase() + str.slice(1);
type Color = {
hex: string;
rgb: string;
hsl: string;
hex: string;
rgb: string;
hsl: string;
};
type Palette = Record<string, Color>;
const library: Palette[] = JSON.parse(
await Deno.readTextFile("../palette.json")
await Deno.readTextFile("../palette.json"),
);
for (const palette in library) {
const colours: Palette = library[palette];
const colours: Palette = library[palette];
const rgbValues = Object.values(colours).map((colour) => [
colour.rgb.match(/\d+/g),
"rgb",
]);
const rgbValues = Object.values(colours).map((colour) => [
colour.rgb.match(/\d+/g),
"rgb",
]);
const name = `Catppuccin ${capitalize(palette)}`;
const data: ArrayBuffer = await createSwatchesFile(name, rgbValues);
const name = `Catppuccin ${capitalize(palette)}`;
const data: ArrayBuffer = await createSwatchesFile(name, rgbValues);
Deno.writeFileSync(`./${name}.swatches`, new Uint8Array(data));
Deno.writeFileSync(`./${name}.swatches`, new Uint8Array(data));
}