mirror of
https://github.com/Dvorinka/excalidraw-full.git
synced 2026-06-04 22:32:55 +00:00
fix: convert cf-kv and excalidraw-libraries from submodules to regular files
- Remove stale cloudflare-worker submodule entry from .gitmodules - Remove .git dirs from cf-kv and excalidraw-libraries so Git tracks them as regular files - Fixes 'No url found for submodule path cf-kv' CI error
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import { readFile, writeFile } from "fs/promises";
|
||||
|
||||
const PATH_LIBRARIES = "./libraries.json";
|
||||
|
||||
const libraries = JSON.parse(await readFile(PATH_LIBRARIES, "utf8"));
|
||||
|
||||
for (const lib of libraries) {
|
||||
if (lib.version === 1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const libraryData = JSON.parse(
|
||||
await readFile(`libraries/` + lib.source, "utf8"),
|
||||
);
|
||||
lib.itemNames = libraryData.libraryItems.reduce((acc, item) => {
|
||||
if (item.name) {
|
||||
acc.push(item.name);
|
||||
}
|
||||
return acc;
|
||||
}, []);
|
||||
}
|
||||
|
||||
await writeFile(PATH_LIBRARIES, JSON.stringify(libraries, null, 2));
|
||||
Reference in New Issue
Block a user