photosite/dist/build.js

23 lines
677 B
JavaScript
Raw Normal View History

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");
const db_1 = require("./db");
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()}`);
this.tmpl = new templates_1.Templates();
this.db = new db_1.DB();
this.main();
}
async main() {
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