diff --git a/gluworld/index.html b/gluworld/index.html index 7376b72..b33fc2a 100644 --- a/gluworld/index.html +++ b/gluworld/index.html @@ -6,23 +6,28 @@ Gluworld -

+

Gluon
- built with
+ built with
running on

- Chromium
-
- V8 +
+
+

+

+ +

+ Build Size
+

Node

- V8 +

V8

@@ -59,7 +64,7 @@ font-size: 34px; } - h1 > code, h2 > span > code { + h1 > code, h2 > p > code { margin-left: 8px; } @@ -68,7 +73,7 @@ font-size: 28px; } - h2 > span, h2 > span > code { + h2 > p, h2 > p > code { font-weight: 600; font-size: 18px; color: #bbb; @@ -83,18 +88,49 @@ #versions { display: flex; justify-content: space-around; + align-items: center; width: 100%; } + + #build, #built_with { + display: none; + } - \ No newline at end of file diff --git a/gluworld/index.js b/gluworld/index.js index 7d5aa22..19ee54c 100644 --- a/gluworld/index.js +++ b/gluworld/index.js @@ -6,8 +6,34 @@ import { join, dirname } from 'path'; const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); +import { readdir, stat } from 'fs/promises'; + +const dirSize = async dir => { + const files = await readdir(dir, { withFileTypes: true }); + + const paths = files.map(async file => { + const path = join(dir, file.name); + + if (file.isDirectory()) return await dirSize(path); + if (file.isFile()) return (await stat(path)).size; + + return 0; + }); + + return (await Promise.all(paths)).flat(Infinity).reduce((acc, x) => acc + x, 0); +}; + (async () => { const Chromium = await Gluon.open(pathToFileURL(join(__dirname, 'index.html')).href, { - windowSize: [ 800, 500 ] + windowSize: [ 800, 500 ], + forceBrowser: 'chrome_canary' }); + + const Firefox = await Gluon.open(pathToFileURL(join(__dirname, 'index.html')).href, { + windowSize: [ 800, 500 ], + forceBrowser: 'firefox_nightly' + }); + + // const buildSize = await dirSize(__dirname); + // Chromium.ipc.send('build size', buildSize); })(); \ No newline at end of file