Build script instantiates the Template class and builds all templates
This commit is contained in:
parent
815538cda6
commit
fd920d5cbc
|
@ -1,10 +1,16 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const log_1 = require("./log");
|
||||
const templates_1 = require("./templates");
|
||||
class Build {
|
||||
constructor() {
|
||||
this.log = (0, log_1.createLog)('build');
|
||||
this.log.info(`Building site: ${new Date()}`);
|
||||
this.tmpl = new templates_1.Templates();
|
||||
this.main();
|
||||
}
|
||||
async main() {
|
||||
this.tmpl.build();
|
||||
}
|
||||
}
|
||||
new Build();
|
||||
|
|
|
@ -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"}
|
|
@ -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
|
|
@ -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"}
|
|
@ -1,13 +1,20 @@
|
|||
import { createLog } from './log';
|
||||
import type { Logger } from 'winston';
|
||||
import { Templates } from './templates';
|
||||
import { Database } from 'sqlite3'
|
||||
import { Database } from 'sqlite3';
|
||||
|
||||
class Build {
|
||||
private log : Logger;
|
||||
private tmpl : Templates;
|
||||
constructor () {
|
||||
this.log = createLog('build');
|
||||
this.log.info(`Building site: ${new Date()}`);
|
||||
this.tmpl = new Templates();
|
||||
this.main();
|
||||
}
|
||||
|
||||
private async main () {
|
||||
this.tmpl.build();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue