mirror of
https://github.com/chrononeko/chronocat.git
synced 2024-11-26 18:18:24 +00:00
17 lines
430 B
TypeScript
17 lines
430 B
TypeScript
|
import { cp, mkdir } from 'node:fs/promises'
|
||
|
import { join, resolve } from 'node:path'
|
||
|
|
||
|
void Promise.all(
|
||
|
['engine-chronocat-api', 'engine-chronocat-event'].map(async (x) => {
|
||
|
const srcPath = resolve(__dirname, `../packages/${x}/lib/index.js`)
|
||
|
|
||
|
const distPath = resolve(__dirname, `../build/dist/${x}`)
|
||
|
|
||
|
await mkdir(distPath, {
|
||
|
recursive: true,
|
||
|
})
|
||
|
|
||
|
await cp(srcPath, join(distPath, `${x}.js`))
|
||
|
}),
|
||
|
)
|