Loading src/main.ts +15 −2 Changes for src/main.ts: 15 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -3,16 +3,29 @@ import { DownloadManager } from './download.ts'; import en from './lang/en.yaml'; // Import translation YAMLs here to avoid transitively inclucing them in Worker code import fr from './lang/fr.yaml'; import { createApp } from 'petite-vue'; import { catchError, DEBUG } from './utils.ts'; import { catchError } from './utils.ts'; import * as mat from 'gl-matrix'; if (DEBUG){ if (import.meta.env.DEV) { (window as any).glMat = mat; } DownloadManager.setBar(document.querySelector('progress#load-progress') as HTMLProgressElement); try { if (import.meta.env.DEV) { fetch(document.location.toString()) .then((res) => res.text()) .then((text) => { const notfound = Object.keys(app.rx.fn).filter( (name) => text.search(RegExp(`\\bfn\.${name}\\b`)) === -1, ); if (notfound.length) console.warn(`Some rx.fn functions have no findable usage in HTML: ${notfound.join(', ')}`); else console.debug('All rx.fn functions found to be used in HTML 👍'); }) .catch(console.error); } const app = new App({ en, fr }); const vApp = createApp(app.rx); Loading Loading
src/main.ts +15 −2 Changes for src/main.ts: 15 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -3,16 +3,29 @@ import { DownloadManager } from './download.ts'; import en from './lang/en.yaml'; // Import translation YAMLs here to avoid transitively inclucing them in Worker code import fr from './lang/fr.yaml'; import { createApp } from 'petite-vue'; import { catchError, DEBUG } from './utils.ts'; import { catchError } from './utils.ts'; import * as mat from 'gl-matrix'; if (DEBUG){ if (import.meta.env.DEV) { (window as any).glMat = mat; } DownloadManager.setBar(document.querySelector('progress#load-progress') as HTMLProgressElement); try { if (import.meta.env.DEV) { fetch(document.location.toString()) .then((res) => res.text()) .then((text) => { const notfound = Object.keys(app.rx.fn).filter( (name) => text.search(RegExp(`\\bfn\.${name}\\b`)) === -1, ); if (notfound.length) console.warn(`Some rx.fn functions have no findable usage in HTML: ${notfound.join(', ')}`); else console.debug('All rx.fn functions found to be used in HTML 👍'); }) .catch(console.error); } const app = new App({ en, fr }); const vApp = createApp(app.rx); Loading