chore: copy shared files in parallel (#823)

pull/831/head
Slyn 2 years ago committed by GitHub
parent 42cbd31327
commit 47f1df5a5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,7 +1,9 @@
import { copy } from 'fs-extra'
import fg from 'fast-glob'
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/'))
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/'))
])
})

Loading…
Cancel
Save