1
0
mirror of synced 2025-12-22 19:34:15 -05:00
Files
docs/script/search/lunr-get-index-names.js
Kevin Heis eddadb875e LFS the Lunr Indexes (#20521)
* LFS the Lunr Indexes

* Add a note about installing Git LFS

* Run "install" command

* Update indexes

* Index names
2021-07-27 22:06:31 +00:00

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', ''))
}