Files
lucide/site/scripts/preBuild.ts
T

18 lines
452 B
TypeScript
Raw Permalink Normal View History

2023-02-16 08:26:29 +01:00
import {fetchTags} from "../src/lib/fetchTags";
import {fetchIconNodes} from "../src/lib/fetchIconNodes";
import NextCache from "../src/lib/nextCache";
const clearCache = async () => {
await NextCache.clear('api-tags', 'api-icon-nodes')
}
const buildCache = async () => {
await Promise.all([fetchTags(), fetchIconNodes()])
}
const rebuildCache = async () => {
await Promise.all([clearCache(), buildCache()])
}
rebuildCache().then(() => null)