Skip to content

Commit

Permalink
chore: copy shared files in parallel (#823)
Browse files Browse the repository at this point in the history
  • Loading branch information
sscode02 authored Jun 21, 2022
1 parent 42cbd31 commit 47f1df5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/copyShared.js
Original file line number Diff line number Diff line change
@@ -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/'))
])
})

0 comments on commit 47f1df5

Please sign in to comment.