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/copyShared.js

10 lines
269 B

import { copy } from 'fs-extra'
import fg from 'fast-glob'
fg.sync('src/shared/**/*.ts').forEach(async (file) => {
await Promise.all([
copy(file, file.replace(/^src\/shared\//, 'src/node/')),
copy(file, file.replace(/^src\/shared\//, 'src/client/'))
])
})