refactor: tidy

This commit is contained in:
cha0s 2024-02-15 06:44:34 -06:00
parent 7a445b07f0
commit 91a857f778
2 changed files with 5 additions and 6 deletions

View File

@ -1,6 +1,8 @@
const {version} = require('../package.json');
export const hooks = {
'@flecks/web.config': async (req, flecks) => {
const {appMountId, title} = flecks.get('@flecks/web');
return {appMountId, title};
return {appMountId, title, version};
},
};

View File

@ -1,12 +1,9 @@
import {D, Flecks} from '@flecks/core';
// eslint-disable-next-line import/no-extraneous-dependencies, import/no-unresolved
const {version} = require('@flecks/web/package.json');
(async () => {
// eslint-disable-next-line no-console
console.log(`flecks client v${version} loading runtime...`);
const config = window[Symbol.for('@flecks/web.config')];
// eslint-disable-next-line no-console
console.log(`flecks client v${config['@flecks/web'].version} loading runtime...`);
const debug = D((config['@flecks/core'] && config['@flecks/core'].id) || 'flecks');
class Progress {