From 0107a4de817b1c74ebc1a4cc1413056180efad4b Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Sat, 14 Oct 2023 15:46:02 +0100 Subject: [PATCH] Docs: compatible with Node-API v9 runtimes --- README.md | 8 ++++++-- docs/README.md | 8 ++++++-- docs/install.md | 14 +++++++++++--- 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 8dcb15c2..fec1c6d0 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,14 @@ sharp logo -The typical use case for this high speed Node.js module +The typical use case for this high speed Node-API module is to convert large images in common formats to smaller, web-friendly JPEG, PNG, WebP, GIF and AVIF images of varying dimensions. +It can be used with all JavaScript runtimes +that provide support for Node-API v9, including +Node.js >= 18.17.0, Deno and Bun. + Resizing an image is typically 4x-5x faster than using the quickest ImageMagick and GraphicsMagick settings due to its use of [libvips](https://github.com/libvips/libvips). @@ -16,7 +20,7 @@ Lanczos resampling ensures quality is not sacrificed for speed. As well as image resizing, operations such as rotation, extraction, compositing and gamma correction are available. -Most modern macOS, Windows and Linux systems running Node.js >= 18.17.0 +Most modern macOS, Windows and Linux systems do not require any additional install or runtime dependencies. ## Documentation diff --git a/docs/README.md b/docs/README.md index 35bcd7cb..58466cd8 100644 --- a/docs/README.md +++ b/docs/README.md @@ -2,10 +2,14 @@ sharp logo -The typical use case for this high speed Node.js module +The typical use case for this high speed Node-API module is to convert large images in common formats to smaller, web-friendly JPEG, PNG, WebP, GIF and AVIF images of varying dimensions. +It can be used with all JavaScript runtimes +that provide support for Node-API v9, including +Node.js >= 18.17.0, Deno and Bun. + Resizing an image is typically 4x-5x faster than using the quickest ImageMagick and GraphicsMagick settings due to its use of [libvips](https://github.com/libvips/libvips). @@ -16,7 +20,7 @@ Lanczos resampling ensures quality is not sacrificed for speed. As well as image resizing, operations such as rotation, extraction, compositing and gamma correction are available. -Most modern macOS, Windows and Linux systems running Node.js >= 14.15.0 +Most modern macOS, Windows and Linux systems do not require any additional install or runtime dependencies. ### Formats diff --git a/docs/install.md b/docs/install.md index 1b942159..1aea1298 100644 --- a/docs/install.md +++ b/docs/install.md @@ -1,5 +1,7 @@ # Installation +Works with your choice of JavaScript package manager. + ```sh npm install sharp ``` @@ -9,14 +11,20 @@ pnpm add sharp ``` ```sh -yarn add sharp +yarn add sharp # v3 recommended, Plug'n'Play unsupported ``` -Yarn Plug'n'Play is unsupported. +```sh +bun add sharp +``` + +```sh +deno run --allow-ffi ... +``` ## Prerequisites -* Node.js >= 18.17.0 +* Node-API v9 compatible runtime e.g. Node.js >= 18.17.0 ## Prebuilt binaries