snipe/web/node_modules/@iconify/utils/lib/loader/node-loader.js
pyr0ball 7a704441a6 feat(snipe): Vue 3 frontend scaffold + Docker web service
- web/: Vue 3 + Vite + UnoCSS + Pinia, dark tactical theme (amber/#0d1117)
- AppNav, ListingCard, SearchView with filters/sort, composables
  (useSnipeMode, useKonamiCode, useMotion), Pinia search store
- Steal shimmer, auction countdown, Snipe Mode easter egg all native in Vue
- docker/web/: nginx + multi-stage Dockerfile (node build → nginx serve)
- compose.yml: api (8510) + web (8509) services
- Dockerfile CMD updated to uvicorn for upcoming FastAPI layer
- Clean build: 0 TS errors, 380 modules
2026-03-25 15:11:35 -07:00

21 lines
No EOL
854 B
JavaScript

import { getPossibleIconNames } from "./utils.js";
import { searchForIcon } from "./modern.js";
import { loadIcon } from "./loader.js";
import { warnOnce } from "./warn.js";
import { loadCollectionFromFS } from "./fs.js";
const loadNodeIcon = async (collection, icon, options) => {
let result = await loadIcon(collection, icon, options);
if (result) return result;
const cwds = Array.isArray(options?.cwd) ? options.cwd : [options?.cwd];
for (let i = 0; i < cwds.length; i++) {
const iconSet = await loadCollectionFromFS(collection, i === cwds.length - 1 ? options?.autoInstall : false, void 0, cwds[i]);
if (iconSet) {
result = await searchForIcon(iconSet, collection, getPossibleIconNames(icon), options);
if (result) return result;
}
}
if (options?.warn) warnOnce(`failed to load ${options.warn} icon`);
};
export { loadNodeIcon };