Building from source now requires node-addon-api in dependencies

If you want to build sharp from source against a globally-installed
libvips then you will now need to add both node-addon-api and
node-gyp to the dependencies section of your package.json file.

The binding.gyp file is "hidden" inside the src directory to
prevent various build and package manager tooling from assuming
that everyone is going to build from source every time.
This commit is contained in:
Lovell Fuller
2023-10-08 15:38:59 +01:00
parent 51e56f994c
commit f7da2e5970
9 changed files with 48 additions and 29 deletions

View File

@@ -14,7 +14,7 @@ const platform = buildPlatformArch();
const dest = path.join(__dirname, platform);
// Use same config as prebuild to copy binary files
const release = path.join(__dirname, '..', 'build', 'Release');
const release = path.join(__dirname, '..', 'src', 'build', 'Release');
const prebuildrc = JSON.parse(fs.readFileSync(path.join(__dirname, '..', '.prebuildrc'), 'utf8'));
const include = new RegExp(prebuildrc['include-regex'], 'i');
fs.cpSync(release, path.join(dest, 'lib'), {