Build script instantiates the Template class and builds all templates

This commit is contained in:
mmcwilliams 2024-01-06 00:27:34 -05:00
parent 815538cda6
commit fd920d5cbc
5 changed files with 27 additions and 2 deletions

6
dist/build.js vendored
View File

@ -1,10 +1,16 @@
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
const log_1 = require("./log"); const log_1 = require("./log");
const templates_1 = require("./templates");
class Build { class Build {
constructor() { constructor() {
this.log = (0, log_1.createLog)('build'); this.log = (0, log_1.createLog)('build');
this.log.info(`Building site: ${new Date()}`); this.log.info(`Building site: ${new Date()}`);
this.tmpl = new templates_1.Templates();
this.main();
}
async main() {
this.tmpl.build();
} }
} }
new Build(); new Build();

2
dist/build.js.map vendored
View File

@ -1 +1 @@
{"version":3,"file":"build.js","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":";;AAAA,+BAAkC;AAGlC,MAAM,KAAK;IAEV;QACC,IAAI,CAAC,GAAG,GAAG,IAAA,eAAS,EAAC,OAAO,CAAC,CAAC;QAC9B,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,kBAAkB,IAAI,IAAI,EAAE,EAAE,CAAC,CAAC;IAC/C,CAAC;CACD;AAED,IAAI,KAAK,EAAE,CAAC"} {"version":3,"file":"build.js","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":";;AAAA,+BAAkC;AAElC,2CAAwC;AAGxC,MAAM,KAAK;IAGV;QACC,IAAI,CAAC,GAAG,GAAG,IAAA,eAAS,EAAC,OAAO,CAAC,CAAC;QAC9B,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,kBAAkB,IAAI,IAAI,EAAE,EAAE,CAAC,CAAC;QAC9C,IAAI,CAAC,IAAI,GAAG,IAAI,qBAAS,EAAE,CAAC;QAC5B,IAAI,CAAC,IAAI,EAAE,CAAC;IACb,CAAC;IAEO,KAAK,CAAC,IAAI;QACjB,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;IACnB,CAAC;CACD;AAED,IAAI,KAAK,EAAE,CAAC"}

11
dist/generate.js vendored Normal file
View File

@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const log_1 = require("./log");
class Generate {
constructor() {
this.log = (0, log_1.createLog)('generate');
this.log.info(`Generating site: ${new Date()}`);
}
}
new Generate();
//# sourceMappingURL=generate.js.map

1
dist/generate.js.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../src/generate.ts"],"names":[],"mappings":";;AAAA,+BAAkC;AAKlC,MAAM,QAAQ;IAEb;QACC,IAAI,CAAC,GAAG,GAAG,IAAA,eAAS,EAAC,UAAU,CAAC,CAAC;QACjC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,oBAAoB,IAAI,IAAI,EAAE,EAAE,CAAC,CAAC;IACjD,CAAC;CACD;AAED,IAAI,QAAQ,EAAE,CAAC"}

View File

@ -1,13 +1,20 @@
import { createLog } from './log'; import { createLog } from './log';
import type { Logger } from 'winston'; import type { Logger } from 'winston';
import { Templates } from './templates'; import { Templates } from './templates';
import { Database } from 'sqlite3' import { Database } from 'sqlite3';
class Build { class Build {
private log : Logger; private log : Logger;
private tmpl : Templates;
constructor () { constructor () {
this.log = createLog('build'); this.log = createLog('build');
this.log.info(`Building site: ${new Date()}`); this.log.info(`Building site: ${new Date()}`);
this.tmpl = new Templates();
this.main();
}
private async main () {
this.tmpl.build();
} }
} }