aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/client-build-stats.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-02-11 08:41:12 +0100
committerChocobozzz <me@florianbigard.com>2021-02-11 08:41:12 +0100
commitd93e43164a716d98cf1c84aa993824ff6d1496ff (patch)
tree665e4e6bf9952d55f0afe4540d5fd72e3c400fe8 /scripts/client-build-stats.ts
parent99bb59fa7796ed2dc25e7771d916411ebb1b9279 (diff)
downloadPeerTube-d93e43164a716d98cf1c84aa993824ff6d1496ff.tar.gz
PeerTube-d93e43164a716d98cf1c84aa993824ff6d1496ff.tar.zst
PeerTube-d93e43164a716d98cf1c84aa993824ff6d1496ff.zip
Update stats format
Diffstat (limited to 'scripts/client-build-stats.ts')
-rw-r--r--scripts/client-build-stats.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/client-build-stats.ts b/scripts/client-build-stats.ts
index a6085902c..70ceda975 100644
--- a/scripts/client-build-stats.ts
+++ b/scripts/client-build-stats.ts
@@ -20,13 +20,16 @@ run()
20async function buildResult (path: string) { 20async function buildResult (path: string) {
21 const distFiles = await readdir(path) 21 const distFiles = await readdir(path)
22 22
23 const files: { [ name: string ]: number } = {} 23 const files: { name: string, size: number }[] = []
24 24
25 for (const file of distFiles) { 25 for (const file of distFiles) {
26 const filePath = join(path, file) 26 const filePath = join(path, file)
27 27
28 const statsResult = await stat(filePath) 28 const statsResult = await stat(filePath)
29 files[file] = statsResult.size 29 files.push({
30 name: file,
31 size: statsResult.size
32 })
30 } 33 }
31 34
32 return files 35 return files