1
0
mirror of synced 2025-12-22 03:16:52 -05:00
Files
docs/script/search/lunr-get-index-names.js
Kevin Heis b29e37318a Remove import x statements (#20594)
* Clear out most import x

* Update rimraf use

* Move up readme blocks in scripts
2021-07-29 20:28:30 +00:00

14 lines
443 B
JavaScript

#!/usr/bin/env node
import { fileURLToPath } from 'url'
import path from 'path'
import fs from 'fs/promises'
const __dirname = path.dirname(fileURLToPath(import.meta.url))
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', ''))
}