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