Basic Docs and publish.yml changes for pnpm v

This commit is contained in:
Shivam Meena
2023-06-10 19:23:58 +05:30
parent 34c0233058
commit 8b2d6652dd
18 changed files with 250 additions and 274 deletions

View File

@@ -34,16 +34,16 @@ const ImageResponse = async (htmlTemplate: string, optionsByUser: ImageResponseO
if (!initialized) {
await initSvgToPng();
initialized = true
initialized = true;
}
const defaultConfig: ConvertOptions = {
width: options.width, // optional
height: options.height, // optional
height: options.height // optional
};
if (Object.hasOwn(options, 'backgroundColor')) {
defaultConfig.backgroundColor = options.backgroundColor
defaultConfig.backgroundColor = options.backgroundColor;
}
const png = await svg2png(svg, defaultConfig);