Alpha Release 0.2.0 - The barcode release #22

Merged
niggl merged 17 commits from dev into main 2021-02-09 18:21:18 +00:00
Showing only changes of commit e1ec193a4f - Show all commits

View File

@ -2,18 +2,16 @@ import axios from 'axios';
import bwipjs from "bwip-js";
import cheerio from "cheerio";
import fs from "fs";
import handlebars from 'handlebars';
import Handlebars from 'handlebars';
import i18next from "i18next";
import Backend from 'i18next-fs-backend';
import mime from "mime-types";
import path from 'path';
import { PDFDocument } from 'pdf-lib';
import promisedHandlebars from "promised-handlebars";
import puppeteer from "puppeteer";
import { Runner } from './models/Runner';
import { RunnerGroup } from './models/RunnerGroup';
const Handlebars = promisedHandlebars(handlebars);
/**
* This class is responsible for all things pdf creation.
* This uses the html templates from src/templates.
@ -88,6 +86,7 @@ export class PdfCreator {
await Handlebars.registerHelper('--bc',
function (str) {
//TODO: Fix the async behaviour
return "data:image"
return PdfCreator.generateBarcode("code39", str.toString());
}
);