in src/BaseHTMLGenerator.ts [39:60]
private readHTML(): Promise<string> {
let self = this;
return new Promise(function (resolve, reject) {
fs.readFile(self.htmlPath, function (err, data) {
if (err) {
return reject(err);
}
self.html = data.toString();
// Put the data in HTML skeleton
self.updateHTML();
// The HTML is ready to be returned
resolve(self.html);
});
}).then((html) => {
if (EnvironVariables.DEBUG) {
self.writeHTML();
}
return html;
}).catch(() => {
return ErrorMessages.READ_HTML_ERROR;
})
}