devicons
Version:
Devicons - Icon font for developers
24 lines (23 loc) • 721 B
JavaScript
// src/index.ts
import path from "path";
import { fileURLToPath } from "url";
var __dirname = path.dirname(fileURLToPath(import.meta.url));
var distPath = (file) => path.resolve(__dirname, "../dist", file);
var cssPath = () => distPath("devicons.css");
var woff2Path = () => distPath("devicons.woff2");
var ttfPath = () => distPath("devicons.ttf");
var spritePath = () => distPath("sprite-symbol.svg");
var codepointsPath = () => distPath("codepoints.json");
var loadCodepoints = async () => {
const fs = await import("fs/promises");
const raw = await fs.readFile(codepointsPath(), "utf-8");
return JSON.parse(raw);
};
export {
codepointsPath,
cssPath,
loadCodepoints,
spritePath,
ttfPath,
woff2Path
};