refactor: split frontend into file per component!

This commit is contained in:
Ilya Kreymer
2020-05-22 23:43:56 -07:00
parent 99b5fe4479
commit e3d5abdbeb
17 changed files with 2760 additions and 2733 deletions
+39
View File
@@ -0,0 +1,39 @@
import { App } from './appmain';
import { CollIndex } from './coll-index';
import { Coll } from './coll';
import { CuratedList } from './curated-lists';
import { GDrive } from './gdrive';
import { Loader } from './loader';
import { Pages } from './pages';
import { Replay } from './replay';
import { URLResources } from './url-resources';
import { register } from 'register-service-worker';
// ===========================================================================
// ===========================================================================
async function main(url) {
let resolve, reject;
const p = new Promise((res, rej) => {
resolve = res;
reject = rej;
});
register(url, {
registrationOptions: { scope: './' },
ready (registration) {
console.log('Service worker is active.');
resolve();
},
error (error) {
console.error('Error during service worker registration:', error);
reject();
}
});
await p;
}
main(__SW_PATH__);