2024-01-06 05:25:07 +00:00
|
|
|
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
2024-01-08 20:10:39 +00:00
|
|
|
require("dotenv/config");
|
2024-01-06 05:25:07 +00:00
|
|
|
const log_1 = require("./log");
|
2024-12-09 23:24:25 +00:00
|
|
|
const db_1 = require("./db");
|
2024-01-06 05:27:34 +00:00
|
|
|
const templates_1 = require("./templates");
|
2024-01-06 05:25:07 +00:00
|
|
|
class Build {
|
|
|
|
constructor() {
|
|
|
|
this.log = (0, log_1.createLog)('build');
|
|
|
|
this.log.info(`Building site: ${new Date()}`);
|
2024-01-06 05:27:34 +00:00
|
|
|
this.tmpl = new templates_1.Templates();
|
2024-12-09 23:24:25 +00:00
|
|
|
this.db = new db_1.DB();
|
2024-01-06 05:27:34 +00:00
|
|
|
this.main();
|
|
|
|
}
|
|
|
|
async main() {
|
2024-12-09 23:24:25 +00:00
|
|
|
let photos;
|
|
|
|
await this.tmpl.build();
|
|
|
|
photos = await this.db.getAll();
|
|
|
|
await this.tmpl.render('index', { photos });
|
2024-01-06 05:25:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
new Build();
|
|
|
|
//# sourceMappingURL=build.js.map
|