mirror of https://github.com/vuejs/vitepress
parent
f054432483
commit
0433aa487e
@ -1,11 +1,11 @@
|
||||
import { copy } from 'fs-extra'
|
||||
import { sync } from 'globby'
|
||||
import fg from 'fast-glob'
|
||||
|
||||
function toDest(file) {
|
||||
return file.replace(/^src\//, 'dist/')
|
||||
}
|
||||
|
||||
sync('src/client/**').forEach((file) => {
|
||||
fg.sync('src/client/**').forEach((file) => {
|
||||
if (/(\.ts|tsconfig\.json)$/.test(file)) return
|
||||
copy(file, toDest(file))
|
||||
})
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { copy } from 'fs-extra'
|
||||
import { sync } from 'globby'
|
||||
import fg from 'fast-glob'
|
||||
|
||||
sync('src/shared/**/*.ts').map(async (file) => {
|
||||
fg.sync('src/shared/**/*.ts').map(async (file) => {
|
||||
await copy(file, file.replace(/^src\/shared\//, 'src/node/'))
|
||||
await copy(file, file.replace(/^src\/shared\//, 'src/client/'))
|
||||
})
|
||||
|
Loading…
Reference in new issue