]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Update stats format
authorChocobozzz <me@florianbigard.com>
Thu, 11 Feb 2021 07:41:12 +0000 (08:41 +0100)
committerChocobozzz <me@florianbigard.com>
Thu, 11 Feb 2021 07:41:12 +0000 (08:41 +0100)
scripts/client-build-stats.ts

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