-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
patch: update unocss, use provider cdn for icons
- Loading branch information
1 parent
98eebd7
commit bee72ed
Showing
2 changed files
with
13 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,21 +30,7 @@ export { math, mathHtml } from "https://esm.sh/[email protected]"; | |
export { default as hljs } from "https://esm.sh/[email protected]"; | ||
export type { HtmlExtension } from "https://esm.sh/[email protected]/index.d.ts"; | ||
|
||
export { createGenerator } from "https://cdn.skypack.dev/@unocss/[email protected]"; | ||
export { default as presetWind } from "https://cdn.skypack.dev/@unocss/[email protected]"; | ||
export { default as presetTypography } from "https://cdn.skypack.dev/@unocss/[email protected]"; | ||
export { default as presetIcons } from "https://cdn.skypack.dev/@unocss/[email protected]"; | ||
|
||
const _iconifyCache = new Map(); | ||
export const iconifyCollections = async (...sets: string[]) => { | ||
const reqs = [], sourceUrl = "https://esm.sh/@iconify/[email protected]/json"; | ||
for (const set of sets) { | ||
if (!_iconifyCache.has(set)) { | ||
const req = fetch(`${sourceUrl}/${set}.json`) | ||
.then((res) => res.json()).then((json) => [set, json]); | ||
_iconifyCache.set(set, req); | ||
} | ||
reqs.push(_iconifyCache.get(set)); | ||
} | ||
return { collections: Object.fromEntries(await Promise.all(reqs)) }; | ||
}; | ||
export { createGenerator } from "https://cdn.skypack.dev/@unocss/[email protected]"; | ||
export { default as presetWind } from "https://cdn.skypack.dev/@unocss/[email protected]"; | ||
export { default as presetTypography } from "https://cdn.skypack.dev/@unocss/[email protected]"; | ||
export { default as presetIcons } from "https://cdn.skypack.dev/@unocss/[email protected]"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters