instant-meme
Advanced tools
Comparing version 1.0.1 to 2.0.0
@@ -10,4 +10,4 @@ const { createCanvas, loadImage, registerFont } = require('canvas') | ||
const fontFile = templateData.font || 'OpenSans-Regular.ttf'; | ||
registerFont(`fonts/${fontFile}`,{family: "daFont"}); | ||
const image = await loadImage(`templates/${templateData.template}`); | ||
registerFont(`instant-meme/fonts/${fontFile}`,{family: "daFont"}); | ||
const image = await loadImage(`instant-meme/templates/${templateData.template}`); | ||
const canvas = createCanvas(image.naturalWidth,image.naturalHeight, 'png'); | ||
@@ -14,0 +14,0 @@ const ctx = canvas.getContext('2d'); |
@@ -9,3 +9,3 @@ /** | ||
const fileName = `${req.params.memeName}.json`; | ||
const json = await fs.promises.readFile(`templates/${fileName}`, 'utf-8'); | ||
const json = await fs.promises.readFile(`instant-meme/templates/${fileName}`, 'utf-8'); | ||
let obj = JSON.parse(json); | ||
@@ -12,0 +12,0 @@ |
{ | ||
"name": "instant-meme", | ||
"version": "1.0.1", | ||
"version": "2.0.0", | ||
"description": "A express middleware to build 'memes' on the fly by specifying the image and text content in the url. Because photoshop is to slow for conversation.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
4169