1 import { readdir, stat } from 'fs-extra'
2 import { join } from 'path'
3 import { root } from '@shared/core-utils'
5 async function run () {
7 app: await buildResult(join(root(), 'client', 'dist', 'en-US')),
8 embed: await buildResult(join(root(), 'client', 'dist', 'standalone', 'videos'))
11 console.log(JSON.stringify(result))
15 .catch(err => console.error(err))
17 async function buildResult (path: string) {
18 const distFiles = await readdir(path)
20 const files: { name: string, size: number }[] = []
22 for (const file of distFiles) {
23 const filePath = join(path, file)
25 const statsResult = await stat(filePath)
28 size: statsResult.size