mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 02:30:12 +02:00
Changelog and doc update for #2217
This commit is contained in:
parent
d248eadb06
commit
b3dd54d550
@ -4,6 +4,12 @@
|
||||
|
||||
Requires libvips v8.9.1
|
||||
|
||||
### v0.25.4 - TBD
|
||||
|
||||
* Allow libvips binary location override where version is appended.
|
||||
[#2217](https://github.com/lovell/sharp/pull/2217)
|
||||
[@malice00](https://github.com/malice00)
|
||||
|
||||
### v0.25.3 - 17th May 2020
|
||||
|
||||
* Ensure libvips is initialised only once, improves worker thread safety.
|
||||
|
@ -182,3 +182,6 @@ GitHub: https://github.com/edsilv
|
||||
|
||||
Name: Dumitru Deveatii
|
||||
GitHub: https://github.com/dimadeveatii
|
||||
|
||||
Name: Roland Asmann
|
||||
GitHub: https://github.com/malice00
|
||||
|
@ -81,24 +81,41 @@ Building from source requires:
|
||||
|
||||
This is an advanced approach that most people will not require.
|
||||
|
||||
To install the prebuilt libvips binaries from a custom URL,
|
||||
set the `sharp_dist_base_url` npm config option
|
||||
or the `SHARP_DIST_BASE_URL` environment variable.
|
||||
To install the prebuilt sharp binaries from a custom URL,
|
||||
set the `sharp_binary_host` npm config option
|
||||
or the `npm_config_sharp_binary_host` environment variable.
|
||||
|
||||
For example, both of the following will result in an attempt to download the file located at
|
||||
`https://hostname/path/libvips-x.y.z-platform.tar.gz`.
|
||||
To install the prebuilt libvips binaries from a custom URL,
|
||||
set the `sharp_libvips_binary_host` npm config option
|
||||
or the `npm_config_sharp_libvips_binary_host` environment variable.
|
||||
|
||||
The version subpath and file name are appended to these.
|
||||
|
||||
For example, if `sharp_libvips_binary_host` is set to `https://hostname/path`
|
||||
and the libvips version is `1.2.3` then the resultant URL will be
|
||||
`https://hostname/path/v1.2.3/libvips-1.2.3-platform-arch.tar.gz`.
|
||||
|
||||
See the Chinese mirror below for a further example.
|
||||
|
||||
## Chinese mirror
|
||||
|
||||
Alibaba provide a mirror site based in China containing binaries for both sharp and libvips.
|
||||
|
||||
To use this either set the following configuration:
|
||||
|
||||
```sh
|
||||
npm config set sharp_dist_base_url "https://hostname/path/"
|
||||
npm config set sharp_binary_host "https://npm.taobao.org/mirrors/sharp"
|
||||
npm config set sharp_libvips_binary_host "https://npm.taobao.org/mirrors/sharp-libvips"
|
||||
npm install sharp
|
||||
```
|
||||
|
||||
```sh
|
||||
SHARP_DIST_BASE_URL="https://hostname/path/" npm install sharp
|
||||
```
|
||||
or set the following environment variables:
|
||||
|
||||
To install the prebuilt sharp binaries from a custom URL, please see
|
||||
[https://github.com/prebuild/prebuild-install#custom-binaries](https://github.com/prebuild/prebuild-install#custom-binaries)
|
||||
```sh
|
||||
npm_config_sharp_binary_host="https://npm.taobao.org/mirrors/sharp" \
|
||||
npm_config_sharp_libvips_binary_host "https://npm.taobao.org/mirrors/sharp-libvips" \
|
||||
npm install sharp
|
||||
```
|
||||
|
||||
## FreeBSD
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
@ -21,8 +21,8 @@ const minimumGlibcVersionByArch = {
|
||||
};
|
||||
|
||||
const { minimumLibvipsVersion, minimumLibvipsVersionLabelled } = libvips;
|
||||
const distHost = process.env.npm_config_sharp_libvips_binary_host || process.env.npm_config_sharp_libvips_binary_host_mirror || 'https://github.com/lovell/sharp-libvips/releases/download/';
|
||||
const distBaseUrl = process.env.npm_config_sharp_dist_base_url || process.env.SHARP_DIST_BASE_URL || distHost + `/v${minimumLibvipsVersionLabelled}/`;
|
||||
const distHost = process.env.npm_config_sharp_libvips_binary_host || 'https://github.com/lovell/sharp-libvips/releases/download';
|
||||
const distBaseUrl = process.env.npm_config_sharp_dist_base_url || process.env.SHARP_DIST_BASE_URL || `${distHost}/v${minimumLibvipsVersionLabelled}/`;
|
||||
|
||||
const fail = function (err) {
|
||||
npmLog.error('sharp', err.message);
|
||||
|
Loading…
x
Reference in New Issue
Block a user