devicons
Version:
Devicons - Icon font for developers
70 lines (66 loc) • 3.09 kB
JavaScript
;
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var src_exports = {};
__export(src_exports, {
codepointsPath: () => codepointsPath,
cssPath: () => cssPath,
loadCodepoints: () => loadCodepoints,
spritePath: () => spritePath,
ttfPath: () => ttfPath,
woff2Path: () => woff2Path
});
module.exports = __toCommonJS(src_exports);
// ../../node_modules/.pnpm/tsup@8.5.1_@microsoft+api-extractor@7.58.2_@types+node@22.9.0__jiti@2.6.1_postcss@8.5.8_08b0cdc61f2621ce5b5b27639c82f6ec/node_modules/tsup/assets/cjs_shims.js
var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.tagName.toUpperCase() === "SCRIPT" ? document.currentScript.src : new URL("main.js", document.baseURI).href;
var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
// src/index.ts
var import_node_path = __toESM(require("path"), 1);
var import_node_url = require("url");
var __dirname = import_node_path.default.dirname((0, import_node_url.fileURLToPath)(importMetaUrl));
var distPath = (file) => import_node_path.default.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);
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
codepointsPath,
cssPath,
loadCodepoints,
spritePath,
ttfPath,
woff2Path
});