Federated video streaming platform using ActivityPub and P2P in the web browser with Angular. https://joinpeertube.org/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

34 lines
748 B

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