mirror of
https://github.com/lovell/sharp.git
synced 2026-02-12 17:46:13 +01:00
Compare commits
2 Commits
deecb81b86
...
e1bad5470e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e1bad5470e | ||
|
|
1a2c1c8833 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,7 +1,6 @@
|
|||||||
src/build
|
src/build
|
||||||
src/node_modules
|
src/node_modules
|
||||||
node_modules
|
node_modules
|
||||||
/coverage
|
|
||||||
npm/*/*
|
npm/*/*
|
||||||
!npm/*/package.json
|
!npm/*/package.json
|
||||||
test/bench/node_modules
|
test/bench/node_modules
|
||||||
@@ -9,7 +8,6 @@ test/fixtures/output*
|
|||||||
test/fixtures/vips-properties.xml
|
test/fixtures/vips-properties.xml
|
||||||
test/leak/libvips.supp
|
test/leak/libvips.supp
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.nyc_output
|
|
||||||
.vscode/
|
.vscode/
|
||||||
package-lock.json
|
package-lock.json
|
||||||
.idea
|
.idea
|
||||||
|
|||||||
@@ -3,9 +3,12 @@ title: v0.35.0 - TBC
|
|||||||
slug: changelog/v0.35.0
|
slug: changelog/v0.35.0
|
||||||
---
|
---
|
||||||
|
|
||||||
* Upgrade to libvips v8.18.0 for upstream bug fixes.
|
* Breaking: Drop support for Node.js 18, now requires Node.js >= 20.9.0.
|
||||||
|
|
||||||
* Drop support for Node.js 18, now requires Node.js >= 20.9.0.
|
* Breaking: Remove `install` script from `package.json` file.
|
||||||
|
Compiling from source is now opt-in via the `build` script.
|
||||||
|
|
||||||
|
* Upgrade to libvips v8.18.0 for upstream bug fixes.
|
||||||
|
|
||||||
* Add `withGainMap` to process HDR JPEG images with embedded gain maps.
|
* Add `withGainMap` to process HDR JPEG images with embedded gain maps.
|
||||||
[#4314](https://github.com/lovell/sharp/issues/4314)
|
[#4314](https://github.com/lovell/sharp/issues/4314)
|
||||||
|
|||||||
@@ -20,10 +20,6 @@ npm install sharp
|
|||||||
pnpm add sharp
|
pnpm add sharp
|
||||||
```
|
```
|
||||||
|
|
||||||
When using `pnpm`, add `sharp` to
|
|
||||||
[ignoredBuiltDependencies](https://pnpm.io/settings#ignoredbuiltdependencies)
|
|
||||||
to silence warnings.
|
|
||||||
|
|
||||||
```sh frame="none"
|
```sh frame="none"
|
||||||
yarn add sharp
|
yarn add sharp
|
||||||
```
|
```
|
||||||
@@ -112,13 +108,13 @@ and on macOS when running Node.js under Rosetta.
|
|||||||
|
|
||||||
## Building from source
|
## Building from source
|
||||||
|
|
||||||
This module will be compiled from source when:
|
```sh frame="none"
|
||||||
|
npm install sharp
|
||||||
|
npm explore sharp -- npm run build
|
||||||
|
```
|
||||||
|
|
||||||
* a globally-installed libvips is detected, or
|
The build process will search for a globally-installed libvips.
|
||||||
* using `npm explore sharp -- npm run build`, or
|
This detection logic can be skipped by setting the
|
||||||
* using the deprecated `npm run --build-from-source` at `npm install` time.
|
|
||||||
|
|
||||||
The logic to detect a globally-installed libvips can be skipped by setting the
|
|
||||||
`SHARP_IGNORE_GLOBAL_LIBVIPS` (never try to use it) or
|
`SHARP_IGNORE_GLOBAL_LIBVIPS` (never try to use it) or
|
||||||
`SHARP_FORCE_GLOBAL_LIBVIPS` (always try to use it, even when missing or outdated)
|
`SHARP_FORCE_GLOBAL_LIBVIPS` (always try to use it, even when missing or outdated)
|
||||||
environment variables.
|
environment variables.
|
||||||
@@ -129,21 +125,12 @@ Building from source requires:
|
|||||||
* [node-addon-api](https://www.npmjs.com/package/node-addon-api) version 7+
|
* [node-addon-api](https://www.npmjs.com/package/node-addon-api) version 7+
|
||||||
* [node-gyp](https://github.com/nodejs/node-gyp#installation) version 9+ and its dependencies
|
* [node-gyp](https://github.com/nodejs/node-gyp#installation) version 9+ and its dependencies
|
||||||
|
|
||||||
There is an install-time check for these dependencies.
|
|
||||||
If `node-addon-api` or `node-gyp` cannot be found, try adding them via:
|
If `node-addon-api` or `node-gyp` cannot be found, try adding them via:
|
||||||
|
|
||||||
```sh frame="none"
|
```sh frame="none"
|
||||||
npm install --save node-addon-api node-gyp
|
npm install --save node-addon-api node-gyp
|
||||||
```
|
```
|
||||||
|
|
||||||
When using `pnpm`, you may need to add `sharp` to
|
|
||||||
[onlyBuiltDependencies](https://pnpm.io/settings#onlybuiltdependencies)
|
|
||||||
to ensure the installation script can be run.
|
|
||||||
|
|
||||||
For cross-compiling, the `--platform`, `--arch` and `--libc` npm flags
|
|
||||||
(or the `npm_config_platform`, `npm_config_arch` and `npm_config_libc` environment variables)
|
|
||||||
can be used to configure the target environment.
|
|
||||||
|
|
||||||
## WebAssembly
|
## WebAssembly
|
||||||
|
|
||||||
Experimental support is provided for runtime environments that provide
|
Experimental support is provided for runtime environments that provide
|
||||||
@@ -166,10 +153,8 @@ as well as the additional [building from source](#building-from-source) dependen
|
|||||||
|
|
||||||
```sh frame="none"
|
```sh frame="none"
|
||||||
pkg install -y pkgconf vips
|
pkg install -y pkgconf vips
|
||||||
```
|
npm install sharp
|
||||||
|
npm explore sharp -- npm run build
|
||||||
```sh frame="none"
|
|
||||||
cd /usr/ports/graphics/vips/ && make install clean
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Linux memory allocator
|
## Linux memory allocator
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ const {
|
|||||||
spawnRebuild,
|
spawnRebuild,
|
||||||
} = require('../lib/libvips');
|
} = require('../lib/libvips');
|
||||||
|
|
||||||
log('Attempting to build from source via node-gyp');
|
log('Building from source');
|
||||||
log('See https://sharp.pixelplumbing.com/install#building-from-source');
|
log('See https://sharp.pixelplumbing.com/install#building-from-source');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -29,7 +29,7 @@ try {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (useGlobalLibvips(log)) {
|
if (useGlobalLibvips(log)) {
|
||||||
log(`Detected globally-installed libvips v${globalLibvipsVersion()}`);
|
log(`Found globally-installed libvips v${globalLibvipsVersion()}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
const status = spawnRebuild();
|
const status = spawnRebuild();
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
/*!
|
|
||||||
Copyright 2013 Lovell Fuller and others.
|
|
||||||
SPDX-License-Identifier: Apache-2.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
try {
|
|
||||||
const { useGlobalLibvips } = require('../lib/libvips');
|
|
||||||
if (useGlobalLibvips() || process.env.npm_config_build_from_source) {
|
|
||||||
process.exit(1);
|
|
||||||
}
|
|
||||||
} catch (err) {
|
|
||||||
const summary = err.message.split(/\n/).slice(0, 1);
|
|
||||||
console.log(`sharp: skipping install check: ${summary}`);
|
|
||||||
}
|
|
||||||
@@ -7,12 +7,13 @@
|
|||||||
|
|
||||||
const { familySync, versionSync } = require('detect-libc');
|
const { familySync, versionSync } = require('detect-libc');
|
||||||
|
|
||||||
|
const { version } = require('../package.json');
|
||||||
const { runtimePlatformArch, isUnsupportedNodeRuntime, prebuiltPlatforms, minimumLibvipsVersion } = require('./libvips');
|
const { runtimePlatformArch, isUnsupportedNodeRuntime, prebuiltPlatforms, minimumLibvipsVersion } = require('./libvips');
|
||||||
const runtimePlatform = runtimePlatformArch();
|
const runtimePlatform = runtimePlatformArch();
|
||||||
|
|
||||||
const paths = [
|
const paths = [
|
||||||
`../src/build/Release/sharp-${runtimePlatform}.node`,
|
`../src/build/Release/sharp-${runtimePlatform}-${version}.node`,
|
||||||
'../src/build/Release/sharp-wasm32.node',
|
`../src/build/Release/sharp-wasm32-${version}.node`,
|
||||||
`@img/sharp-${runtimePlatform}/sharp.node`,
|
`@img/sharp-${runtimePlatform}/sharp.node`,
|
||||||
'@img/sharp-wasm32/sharp.node'
|
'@img/sharp-wasm32/sharp.node'
|
||||||
];
|
];
|
||||||
@@ -72,6 +73,7 @@ if (sharp) {
|
|||||||
} else {
|
} else {
|
||||||
help.push(
|
help.push(
|
||||||
`- Manually install libvips >= ${minimumLibvipsVersion}`,
|
`- Manually install libvips >= ${minimumLibvipsVersion}`,
|
||||||
|
' See https://sharp.pixelplumbing.com/install#building-from-source',
|
||||||
'- Add experimental WebAssembly-based dependencies:',
|
'- Add experimental WebAssembly-based dependencies:',
|
||||||
' npm install --cpu=wasm32 sharp',
|
' npm install --cpu=wasm32 sharp',
|
||||||
' npm install @img/sharp-wasm32'
|
' npm install @img/sharp-wasm32'
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
"@img/sharp-libvips-darwin-arm64": "1.3.0-rc.1"
|
"@img/sharp-libvips-darwin-arm64": "1.3.0-rc.1"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
|
"index.cjs",
|
||||||
"lib"
|
"lib"
|
||||||
],
|
],
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
@@ -25,7 +26,7 @@
|
|||||||
},
|
},
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"exports": {
|
"exports": {
|
||||||
"./sharp.node": "./lib/sharp-darwin-arm64.node",
|
"./sharp.node": "./index.cjs",
|
||||||
"./package": "./package.json"
|
"./package": "./package.json"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
"@img/sharp-libvips-darwin-x64": "1.3.0-rc.1"
|
"@img/sharp-libvips-darwin-x64": "1.3.0-rc.1"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
|
"index.cjs",
|
||||||
"lib"
|
"lib"
|
||||||
],
|
],
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
@@ -25,7 +26,7 @@
|
|||||||
},
|
},
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"exports": {
|
"exports": {
|
||||||
"./sharp.node": "./lib/sharp-darwin-x64.node",
|
"./sharp.node": "./index.cjs",
|
||||||
"./package": "./package.json"
|
"./package": "./package.json"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
@@ -44,9 +44,10 @@ cpSync(releaseDir, libDir, {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Generate README
|
// Generate README and index.cjs
|
||||||
const { name, description } = require(`./${platform}/package.json`);
|
const { version, name, description } = require(`./${platform}/package.json`);
|
||||||
writeFileSync(join(destDir, 'README.md'), `# \`${name}\`\n\n${description}.\n${licensing}`);
|
writeFileSync(join(destDir, 'README.md'), `# \`${name}\`\n\n${description}.\n${licensing}`);
|
||||||
|
writeFileSync(join(destDir, 'index.cjs'), `module.exports = require('./lib/sharp-${platform}-${version}.node');`);
|
||||||
|
|
||||||
// Copy Apache-2.0 LICENSE
|
// Copy Apache-2.0 LICENSE
|
||||||
copyFileSync(join(__dirname, '..', 'LICENSE'), join(destDir, 'LICENSE'));
|
copyFileSync(join(__dirname, '..', 'LICENSE'), join(destDir, 'LICENSE'));
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
"@img/sharp-libvips-linux-arm": "1.3.0-rc.1"
|
"@img/sharp-libvips-linux-arm": "1.3.0-rc.1"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
|
"index.cjs",
|
||||||
"lib"
|
"lib"
|
||||||
],
|
],
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
@@ -25,7 +26,7 @@
|
|||||||
},
|
},
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"exports": {
|
"exports": {
|
||||||
"./sharp.node": "./lib/sharp-linux-arm.node",
|
"./sharp.node": "./index.cjs",
|
||||||
"./package": "./package.json"
|
"./package": "./package.json"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
"@img/sharp-libvips-linux-arm64": "1.3.0-rc.1"
|
"@img/sharp-libvips-linux-arm64": "1.3.0-rc.1"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
|
"index.cjs",
|
||||||
"lib"
|
"lib"
|
||||||
],
|
],
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
@@ -25,7 +26,7 @@
|
|||||||
},
|
},
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"exports": {
|
"exports": {
|
||||||
"./sharp.node": "./lib/sharp-linux-arm64.node",
|
"./sharp.node": "./index.cjs",
|
||||||
"./package": "./package.json"
|
"./package": "./package.json"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
"@img/sharp-libvips-linux-ppc64": "1.3.0-rc.1"
|
"@img/sharp-libvips-linux-ppc64": "1.3.0-rc.1"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
|
"index.cjs",
|
||||||
"lib"
|
"lib"
|
||||||
],
|
],
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
@@ -25,7 +26,7 @@
|
|||||||
},
|
},
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"exports": {
|
"exports": {
|
||||||
"./sharp.node": "./lib/sharp-linux-ppc64.node",
|
"./sharp.node": "./index.cjs",
|
||||||
"./package": "./package.json"
|
"./package": "./package.json"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
"@img/sharp-libvips-linux-riscv64": "1.3.0-rc.1"
|
"@img/sharp-libvips-linux-riscv64": "1.3.0-rc.1"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
|
"index.cjs",
|
||||||
"lib"
|
"lib"
|
||||||
],
|
],
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
@@ -25,7 +26,7 @@
|
|||||||
},
|
},
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"exports": {
|
"exports": {
|
||||||
"./sharp.node": "./lib/sharp-linux-riscv64.node",
|
"./sharp.node": "./index.cjs",
|
||||||
"./package": "./package.json"
|
"./package": "./package.json"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
"@img/sharp-libvips-linux-s390x": "1.3.0-rc.1"
|
"@img/sharp-libvips-linux-s390x": "1.3.0-rc.1"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
|
"index.cjs",
|
||||||
"lib"
|
"lib"
|
||||||
],
|
],
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
@@ -25,7 +26,7 @@
|
|||||||
},
|
},
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"exports": {
|
"exports": {
|
||||||
"./sharp.node": "./lib/sharp-linux-s390x.node",
|
"./sharp.node": "./index.cjs",
|
||||||
"./package": "./package.json"
|
"./package": "./package.json"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
"@img/sharp-libvips-linux-x64": "1.3.0-rc.1"
|
"@img/sharp-libvips-linux-x64": "1.3.0-rc.1"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
|
"index.cjs",
|
||||||
"lib"
|
"lib"
|
||||||
],
|
],
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
@@ -25,7 +26,7 @@
|
|||||||
},
|
},
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"exports": {
|
"exports": {
|
||||||
"./sharp.node": "./lib/sharp-linux-x64.node",
|
"./sharp.node": "./index.cjs",
|
||||||
"./package": "./package.json"
|
"./package": "./package.json"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
"@img/sharp-libvips-linuxmusl-arm64": "1.3.0-rc.1"
|
"@img/sharp-libvips-linuxmusl-arm64": "1.3.0-rc.1"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
|
"index.cjs",
|
||||||
"lib"
|
"lib"
|
||||||
],
|
],
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
@@ -25,7 +26,7 @@
|
|||||||
},
|
},
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"exports": {
|
"exports": {
|
||||||
"./sharp.node": "./lib/sharp-linuxmusl-arm64.node",
|
"./sharp.node": "./index.cjs",
|
||||||
"./package": "./package.json"
|
"./package": "./package.json"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
"@img/sharp-libvips-linuxmusl-x64": "1.3.0-rc.1"
|
"@img/sharp-libvips-linuxmusl-x64": "1.3.0-rc.1"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
|
"index.cjs",
|
||||||
"lib"
|
"lib"
|
||||||
],
|
],
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
@@ -25,7 +26,7 @@
|
|||||||
},
|
},
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"exports": {
|
"exports": {
|
||||||
"./sharp.node": "./lib/sharp-linuxmusl-x64.node",
|
"./sharp.node": "./index.cjs",
|
||||||
"./package": "./package.json"
|
"./package": "./package.json"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
},
|
},
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"exports": {
|
"exports": {
|
||||||
"./sharp.node": "./lib/sharp-wasm32.node.js",
|
"./sharp.node": "./index.cjs",
|
||||||
"./package": "./package.json",
|
"./package": "./package.json",
|
||||||
"./versions": "./versions.json"
|
"./versions": "./versions.json"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
},
|
},
|
||||||
"preferUnplugged": true,
|
"preferUnplugged": true,
|
||||||
"files": [
|
"files": [
|
||||||
|
"index.cjs",
|
||||||
"lib",
|
"lib",
|
||||||
"versions.json"
|
"versions.json"
|
||||||
],
|
],
|
||||||
@@ -23,7 +24,7 @@
|
|||||||
},
|
},
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"exports": {
|
"exports": {
|
||||||
"./sharp.node": "./lib/sharp-win32-arm64.node",
|
"./sharp.node": "./index.cjs",
|
||||||
"./package": "./package.json",
|
"./package": "./package.json",
|
||||||
"./versions": "./versions.json"
|
"./versions": "./versions.json"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
},
|
},
|
||||||
"preferUnplugged": true,
|
"preferUnplugged": true,
|
||||||
"files": [
|
"files": [
|
||||||
|
"index.cjs",
|
||||||
"lib",
|
"lib",
|
||||||
"versions.json"
|
"versions.json"
|
||||||
],
|
],
|
||||||
@@ -23,7 +24,7 @@
|
|||||||
},
|
},
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"exports": {
|
"exports": {
|
||||||
"./sharp.node": "./lib/sharp-win32-ia32.node",
|
"./sharp.node": "./index.cjs",
|
||||||
"./package": "./package.json",
|
"./package": "./package.json",
|
||||||
"./versions": "./versions.json"
|
"./versions": "./versions.json"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
},
|
},
|
||||||
"preferUnplugged": true,
|
"preferUnplugged": true,
|
||||||
"files": [
|
"files": [
|
||||||
|
"index.cjs",
|
||||||
"lib",
|
"lib",
|
||||||
"versions.json"
|
"versions.json"
|
||||||
],
|
],
|
||||||
@@ -23,7 +24,7 @@
|
|||||||
},
|
},
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"exports": {
|
"exports": {
|
||||||
"./sharp.node": "./lib/sharp-win32-x64.node",
|
"./sharp.node": "./index.cjs",
|
||||||
"./package": "./package.json",
|
"./package": "./package.json",
|
||||||
"./versions": "./versions.json"
|
"./versions": "./versions.json"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -93,8 +93,7 @@
|
|||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "node install/build.js",
|
"build": "node install/build.js",
|
||||||
"install": "node install/check.js || npm run build",
|
"clean": "rm -rf src/build/ test/fixtures/output.*",
|
||||||
"clean": "rm -rf src/build/ .nyc_output/ coverage/ test/fixtures/output.*",
|
|
||||||
"test": "npm run lint && npm run test-unit",
|
"test": "npm run lint && npm run test-unit",
|
||||||
"lint": "npm run lint-cpp && npm run lint-js && npm run lint-types",
|
"lint": "npm run lint-cpp && npm run lint-js && npm run lint-types",
|
||||||
"lint-cpp": "cpplint --quiet src/*.h src/*.cc",
|
"lint-cpp": "cpplint --quiet src/*.h src/*.cc",
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
'variables': {
|
'variables': {
|
||||||
'vips_version': '<!(node -p "require(\'../lib/libvips\').minimumLibvipsVersion")',
|
'vips_version': '<!(node -p "require(\'../lib/libvips\').minimumLibvipsVersion")',
|
||||||
'platform_and_arch': '<!(node -p "require(\'../lib/libvips\').buildPlatformArch()")',
|
'platform_and_arch': '<!(node -p "require(\'../lib/libvips\').buildPlatformArch()")',
|
||||||
|
'sharp_version': '<!(node -p "require(\'../package.json\').version")',
|
||||||
'sharp_libvips_version': '<!(node -p "require(\'../package.json\').optionalDependencies[\'@img/sharp-libvips-<(platform_and_arch)\']")',
|
'sharp_libvips_version': '<!(node -p "require(\'../package.json\').optionalDependencies[\'@img/sharp-libvips-<(platform_and_arch)\']")',
|
||||||
'sharp_libvips_yarn_locator': '<!(node -p "require(\'../lib/libvips\').yarnLocator()")',
|
'sharp_libvips_yarn_locator': '<!(node -p "require(\'../lib/libvips\').yarnLocator()")',
|
||||||
'sharp_libvips_include_dir': '<!(node -p "require(\'../lib/libvips\').buildSharpLibvipsIncludeDir()")',
|
'sharp_libvips_include_dir': '<!(node -p "require(\'../lib/libvips\').buildSharpLibvipsIncludeDir()")',
|
||||||
@@ -81,7 +82,7 @@
|
|||||||
}]
|
}]
|
||||||
]
|
]
|
||||||
}, {
|
}, {
|
||||||
'target_name': 'sharp-<(platform_and_arch)',
|
'target_name': 'sharp-<(platform_and_arch)-<(sharp_version)',
|
||||||
'defines': [
|
'defines': [
|
||||||
'G_DISABLE_ASSERT',
|
'G_DISABLE_ASSERT',
|
||||||
'G_DISABLE_CAST_CHECKS',
|
'G_DISABLE_CAST_CHECKS',
|
||||||
@@ -282,7 +283,7 @@
|
|||||||
'target_name': 'copy-dll',
|
'target_name': 'copy-dll',
|
||||||
'type': 'none',
|
'type': 'none',
|
||||||
'dependencies': [
|
'dependencies': [
|
||||||
'sharp-<(platform_and_arch)'
|
'sharp-<(platform_and_arch)-<(sharp_version)'
|
||||||
],
|
],
|
||||||
'conditions': [
|
'conditions': [
|
||||||
['OS == "win"', {
|
['OS == "win"', {
|
||||||
|
|||||||
Reference in New Issue
Block a user