Files
lucide/site/scripts/preBuild.ts
Eric Fennis 0bbaaa8abd Fix site build (#955)
* Fix prebuild

* remove env file
2023-02-21 17:33:29 +01:00

18 lines
452 B
TypeScript

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)