mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-19 19:45:15 +00:00
10 lines
331 B
TypeScript
10 lines
331 B
TypeScript
|
import * as fs from 'fs/promises'
|
||
|
import { createSearchIndex } from './search'
|
||
|
|
||
|
export async function writeSearchIndex() {
|
||
|
await fs.mkdir('public').catch(() => {})
|
||
|
await fs.mkdir('public/static').catch(() => {})
|
||
|
const index = createSearchIndex()
|
||
|
await fs.writeFile('public/static/fuse-index.json', JSON.stringify(index))
|
||
|
}
|