Added stylesheets generation for lichess boards

This commit is contained in:
Maciej Caderek
2022-05-03 05:34:39 +02:00
parent 2c5341a6b5
commit 00b6f63b0c
266 changed files with 1942 additions and 470 deletions

12
scripts/utils/encode.ts Normal file
View File

@@ -0,0 +1,12 @@
import fs from "fs";
import mime from "mime";
const encode = (filePath: string) => {
const data = fs.readFileSync(filePath).toString("base64");
const type = mime.getType(filePath);
return `data:${type};base64,${data}`;
};
export default encode;