mirror of https://github.com/vuejs/vitepress
parent
0d0c1caf80
commit
aaa9963787
@ -1,12 +1,12 @@
|
||||
import { copy } from 'fs-extra'
|
||||
import fg from 'fast-glob'
|
||||
|
||||
const copyPromises = []
|
||||
fg.stream('src/shared/**/*.ts').on('data', (file) => {
|
||||
copyPromises.push(
|
||||
copy(file, file.replace(/^src\/shared\//, 'src/node/')),
|
||||
copy(file, file.replace(/^src\/shared\//, 'src/client/'))
|
||||
)
|
||||
})
|
||||
|
||||
await Promise.all(copyPromises)
|
||||
await Promise.all(
|
||||
fg
|
||||
.sync('src/shared/**/*.ts')
|
||||
.map((file) => [
|
||||
copy(file, file.replace(/^src\/shared\//, 'src/node/')),
|
||||
copy(file, file.replace(/^src\/shared\//, 'src/client/'))
|
||||
])
|
||||
.flat()
|
||||
)
|
||||
|
||||
Loading…
Reference in new issue