From d23469aa4579410fe6a0d1f3b067c7250466632c Mon Sep 17 00:00:00 2001 From: Shivam Meena Date: Sat, 10 Jun 2023 10:41:54 +0530 Subject: [PATCH] Updated Readme --- README.md | 14 ++++++++++---- package.json | 10 +++++----- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index d813d0a..a8b1989 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,13 @@ Dynamically generate Open Graph images from an HTML+CSS template or Svelte compo ## Installation -```sh -npm install -D @ethercorps/sveltekit-og +```bash +pnpm install -D @ethercorps/sveltekit-og +``` +> Using with Cloudflare Pages or Workers then you have to provide `url` polyfill by just installing it as `devDependency`. +> +```bash +pnpm i -D url ``` ## Usage @@ -95,7 +100,8 @@ ImageResponse( element : string, options : { width ? : number = 1200 - height ? : number = 630 + height ? : number = 630, + backgroundColor ? : string = "#fff" fonts ? : { name: string, data: ArrayBuffer, @@ -170,7 +176,7 @@ This project will not be possible without the following projects: - [Satori & @vercel/og](https://github.com/vercel/satori) - [Noto by Google Fonts](https://fonts.google.com/noto) -- [Resvg.js](https://github.com/yisibl/resvg-js) +- [svg2png-wasm](https://github.com/ssssota/svg2png-wasm) ## Authors diff --git a/package.json b/package.json index ba378dd..7167152 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ethercorps/sveltekit-og", - "version": "2.0.0@beta.0", + "version": "2.0.0", "private": false, "scripts": { "dev": "vite dev --host", @@ -31,18 +31,18 @@ "prettier": "^2.8.8", "prettier-plugin-svelte": "^2.10.1", "prismjs": "^1.29.0", + "svelte": "^3.59.1", "svelte-check": "^2.10.3", "svelte-preprocess": "^4.10.7", "tailwindcss": "^3.3.2", "tslib": "^2.5.3", "typescript": "^4.9.5", - "vite": "^4.3.9", - "svelte": "^3.59.1" + "vite": "^4.3.9" }, "type": "module", "dependencies": { - "svg2png-wasm": "^1.4.0", - "satori": "^0.10.1" + "satori": "^0.10.1", + "svg2png-wasm": "^1.4.0" }, "keywords": [ "open graph image",