nandi/oripublic Fork 0
00224b167266e7d496672adfe1e60fcffeab7e63
Commits
Clone
git clone https://git.rickub.com/nandi/ori.git
git clone ssh://git@rickub.com/nandi/ori.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

forked from bots-garden/ori

copy-icons.mjs · 20 lines · 677 BJavaScript Blame HistoryRaw
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
// Copies the Material icon SVGs from vscode-material-icons into public/, so
// Vite ships them as static assets. Runs automatically before `dev` and
// `build` (npm pre-hooks); the copy is skipped when already present.
import { cpSync, existsSync } from "node:fs";
import { fileURLToPath } from "node:url";

const source = fileURLToPath(
	new URL(
		"../node_modules/vscode-material-icons/generated/icons",
		import.meta.url,
	),
);
const destination = fileURLToPath(
	new URL("../public/material-icons", import.meta.url),
);

if (!existsSync(destination)) {
	cpSync(source, destination, { recursive: true });
	console.log("material icons copied to public/material-icons");
}