Update stats format

This commit is contained in:
Chocobozzz 2021-02-11 08:41:12 +01:00
parent 99bb59fa77
commit d93e43164a
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 5 additions and 2 deletions

View File

@ -20,13 +20,16 @@ run()
async function buildResult (path: string) { async function buildResult (path: string) {
const distFiles = await readdir(path) const distFiles = await readdir(path)
const files: { [ name: string ]: number } = {} const files: { name: string, size: number }[] = []
for (const file of distFiles) { for (const file of distFiles) {
const filePath = join(path, file) const filePath = join(path, file)
const statsResult = await stat(filePath) const statsResult = await stat(filePath)
files[file] = statsResult.size files.push({
name: file,
size: statsResult.size
})
} }
return files return files