mirror of https://github.com/vuejs/vitepress
parent
ed2e52f3b1
commit
758e25aa5c
@ -0,0 +1,12 @@
|
||||
import path from 'path'
|
||||
import fs from 'fs'
|
||||
|
||||
export const getFragment = (
|
||||
dir: string,
|
||||
name: string,
|
||||
fragmentsDir = 'fragments'
|
||||
): string => {
|
||||
const target = path.resolve(dir, `${fragmentsDir}/${name}`)
|
||||
// just return the file content for now
|
||||
return fs.readFileSync(target, 'utf-8')
|
||||
}
|
@ -0,0 +1 @@
|
||||
export * from './getFragment'
|
Loading…
Reference in new issue