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.
vitepress/scripts/copyClient.js

12 lines
253 B

import { copy } from 'fs-extra'
import fg from 'fast-glob'
function toDest(file) {
return file.replace(/^src\//, 'dist/')
}
fg.sync('src/client/**').forEach((file) => {
if (/(\.ts|tsconfig\.json)$/.test(file)) return
copy(file, toDest(file))
})