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.ts

10 lines
285 B

import { cp } from 'node:fs/promises'
import { globSync } from 'tinyglobby'
globSync(['src/shared/**/*.ts']).forEach(async (file) => {
await Promise.all([
cp(file, file.replace(/^src\/shared\//, 'src/node/')),
cp(file, file.replace(/^src\/shared\//, 'src/client/'))
])
})