The --build-from-source flag is now deprecated and will soon
be removed along with the need to define an install script.
This will remove a whole category of package manager
warnings about install scripts and "built" dependencies.
Most people don't need to build sharp from source, but for
those that do, a suitable method is now something like:
$ npm install package-that-depends-on-sharp
$ npm explore sharp -- npm run build
Uses the recommended rules apart from complexity/useArrowFunction,
which would affect about 1700 lines of code with little benefit
right now. This is something that can be addressed over time.
Allows the install/check script to inject a logger function,
keeping its use within binding.gyp free of additional output.
Co-authored-by: Lovell Fuller <github@lovell.info>
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.
- Remove all custom download logic for prebuilt binaries
- Add scripts to populate package contents
- Specify minimum versions of common package managers
- Remove sharp.vendor runtime API as no-longer relevant
- Update installation docs and issue templates