gluworld: use args to select browsers, if not use default

This commit is contained in:
CanadaHonk 2022-12-13 20:07:11 +00:00
parent 04c4b57586
commit 3c51cda873

View File

@ -24,14 +24,19 @@ const dirSize = async dir => {
};
(async () => {
const Chromium = await Gluon.open(pathToFileURL(join(__dirname, 'index.html')).href, {
if (process.argv.length > 2) { // use argv as browsers to use
for (const forceBrowser of process.argv.slice(2)) {
await Gluon.open(pathToFileURL(join(__dirname, 'index.html')).href, {
windowSize: [ 800, 500 ],
forceBrowser: 'chrome_canary'
forceBrowser
});
}
const Firefox = await Gluon.open(pathToFileURL(join(__dirname, 'index.html')).href, {
windowSize: [ 800, 500 ],
forceBrowser: 'firefox_nightly'
return;
}
const Browser = await Gluon.open(pathToFileURL(join(__dirname, 'index.html')).href, {
windowSize: [ 800, 500 ]
});
// const buildSize = await dirSize(__dirname);