* LFS the Lunr Indexes * Add a note about installing Git LFS * Run "install" command * Update indexes * Index names
15 lines
459 B
JavaScript
15 lines
459 B
JavaScript
#!/usr/bin/env node
|
|
import { fileURLToPath } from 'url'
|
|
import path from 'path'
|
|
import xFs from 'fs'
|
|
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
|
const fs = xFs.promises
|
|
|
|
export default async function getIndexNames() {
|
|
const indexList = await fs.readdir(path.join(__dirname, '../../lib/search/indexes'))
|
|
return indexList
|
|
.sort()
|
|
.filter((index) => !index.includes('records'))
|
|
.map((index) => index.replace('.json.br', ''))
|
|
}
|