mirror of https://github.com/vuejs/vitepress
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
437 B
20 lines
437 B
import fs from 'fs'
|
|
|
|
type Data = Record<string, boolean>[]
|
|
export declare const data: Data
|
|
|
|
export default {
|
|
watch: ['./data/*'],
|
|
async load(files: string[]): Promise<Data> {
|
|
const foo = fs.readFileSync(
|
|
files.find((f) => f.endsWith('foo.json'))!,
|
|
'utf-8'
|
|
)
|
|
const bar = fs.readFileSync(
|
|
files.find((f) => f.endsWith('bar.json'))!,
|
|
'utf-8'
|
|
)
|
|
return [JSON.parse(foo), JSON.parse(bar)]
|
|
}
|
|
}
|