]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - scripts/client-build-stats.ts
Translated using Weblate (Croatian)
[github/Chocobozzz/PeerTube.git] / scripts / client-build-stats.ts
index a6085902cbd7d96833a327926c1cc5b16c4c455b..d5ecd5fea37f4efb4f98e5c68f2f9441194490c1 100644 (file)
@@ -1,9 +1,6 @@
-import { registerTSPaths } from '../server/helpers/register-ts-paths'
-registerTSPaths()
-
 import { readdir, stat } from 'fs-extra'
 import { join } from 'path'
-import { root } from '@server/helpers/core-utils'
+import { root } from '@shared/core-utils'
 
 async function run () {
   const result = {
@@ -20,13 +17,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