/
aurelia.main.ts
35 lines (32 loc) · 1.03 KB
/
aurelia.main.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import { bootstrap } from 'aurelia-bootstrapper';
import { Aurelia } from 'aurelia-framework';
import { PLATFORM } from 'aurelia-pal';
import { importCatch, run } from './app.run';
export function configure(aurelia: Aurelia): void {
const htmlDivElement: HTMLDivElement | null = document.querySelector('div#aurelia');
if (htmlDivElement instanceof HTMLDivElement) {
htmlDivElement.style.display = 'inline';
aurelia.use.standardConfiguration().developmentLogging();
aurelia
.start()
.then(() => {
aurelia
.setRoot(PLATFORM.moduleName('components/app/component.aurelia'), htmlDivElement)
.then(() => {})
.catch(() => {})
.finally(() => {});
})
.catch(() => {})
.finally(() => {});
}
}
import(`aurelia-framework/package.json`)
.then((packageJson: { default: Object }) => {
run('Aurelia', packageJson, () => {
bootstrap(configure)
.then(() => {})
.catch(() => {})
.finally(() => {});
});
})
.catch(importCatch);