Spaces:
Running
Running
File size: 897 Bytes
f0bb158 |
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 |
import { DataFetcher } from './data-fetcher.js';
import { ProgressBar } from './progress-bar.js';
import { ChartManager } from './chart-manager.js';
import { PixelCounter } from './pixel-counter.js';
class App {
constructor() {
this.dataFetcher = new DataFetcher();
this.progressBar = new ProgressBar('progressBar');
this.chartManager = new ChartManager();
this.pixelCounter = new PixelCounter();
}
async init() {
try {
const data = await this.dataFetcher.fetchAllData();
this.progressBar.init(data.repoData);
this.chartManager.init(data.repoData, data.fileData);
this.pixelCounter.init(data.bytesData);
} catch (error) {
console.error('Failed to initialize app:', error);
}
}
}
(async () => {
const app = new App();
await app.init();
})();
|