style: reformat after editorconfig change
This commit is contained in:
parent
a04bd7869c
commit
ec883a880b
1 changed files with 12 additions and 12 deletions
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue