mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-04 18:59:08 +00:00
REFACTOR: create builder for parser reporterand fix pdf
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import { readFileSync } from 'fs';
|
||||
import Handlebars from 'handlebars';
|
||||
import { Parser } from './parser.interface';
|
||||
|
||||
export class HtmlParser<T> {
|
||||
export class HtmlParser<T> implements Parser<T> {
|
||||
constructor(private readonly templatePath: string) {}
|
||||
parse(data: T[]) {
|
||||
async parse(data: T[]) {
|
||||
const templateSource = readFileSync(this.templatePath, 'utf8');
|
||||
|
||||
const template = Handlebars.compile(templateSource);
|
||||
|
||||
Reference in New Issue
Block a user