mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 02:30:12 +02:00
Improve dependency-less documentation
Start to comment ever-growing GYP config Add Circle CI config to run packaging tests
This commit is contained in:
parent
ee8fcb6109
commit
bf6b894480
@ -7,6 +7,7 @@ coverage
|
||||
test
|
||||
.travis.yml
|
||||
appveyor.yml
|
||||
circle.yml
|
||||
mkdocs.yml
|
||||
lib
|
||||
include
|
||||
|
@ -4,11 +4,14 @@ The typical use case for this high speed Node.js module
|
||||
is to convert large images of many formats to
|
||||
smaller, web-friendly JPEG, PNG and WebP images of varying dimensions.
|
||||
|
||||
`npm install sharp`
|
||||
Resizing an image is typically 4x faster than using the
|
||||
quickest ImageMagick and GraphicsMagick settings.
|
||||
|
||||
A pre-built version of libvips is provided for Windows and most Linux systems.
|
||||
64-bit Windows and recent Linux systems do not require
|
||||
the installation of any external runtime dependencies.
|
||||
|
||||
Installation of libvips on OS X is as simple as `brew install homebrew/science/vips`.
|
||||
Use with OS X is as simple as running `brew install homebrew/science/vips`
|
||||
to install the libvips dependency.
|
||||
|
||||
[](https://coveralls.io/r/lovell/sharp?branch=master)
|
||||
|
||||
|
11
binding.gyp
11
binding.gyp
@ -1,11 +1,13 @@
|
||||
{
|
||||
'targets': [{
|
||||
'target_name': 'sharp',
|
||||
# Nested variables "pattern" borrowed from http://src.chromium.org/viewvc/chrome/trunk/src/build/common.gypi
|
||||
'variables': {
|
||||
'variables': {
|
||||
'variables': {
|
||||
'conditions': [
|
||||
['OS != "win"', {
|
||||
# Build the PKG_CONFIG_PATH environment variable with all possible combinations
|
||||
'pkg_config_path': '<!(which brew >/dev/null 2>&1 && eval $(brew --env) && echo $PKG_CONFIG_LIBDIR || true):$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig'
|
||||
}, {
|
||||
'pkg_config_path': ''
|
||||
@ -14,6 +16,7 @@
|
||||
},
|
||||
'conditions': [
|
||||
['OS != "win"', {
|
||||
# Which version, if any, of libvips is available globally via pkg-config?
|
||||
'global_vips_version': '<!(PKG_CONFIG_PATH="<(pkg_config_path)" pkg-config --modversion vips 2>/dev/null || true)'
|
||||
}, {
|
||||
'global_vips_version': ''
|
||||
@ -25,6 +28,7 @@
|
||||
'runtime_link%': 'shared',
|
||||
'conditions': [
|
||||
['OS != "win"', {
|
||||
# Does the globally available version of libvips, if any, meet the minimum version requirement?
|
||||
'use_global_vips': '<!(GLOBAL_VIPS_VERSION="<(global_vips_version)" node -e "require(\'./binding\').use_global_vips()")'
|
||||
}, {
|
||||
'use_global_vips': ''
|
||||
@ -44,6 +48,7 @@
|
||||
],
|
||||
'conditions': [
|
||||
['use_global_vips == "true"', {
|
||||
# Use pkg-config for include and lib
|
||||
'include_dirs': ['<!(PKG_CONFIG_PATH="<(pkg_config_path)" pkg-config --cflags vips glib-2.0)'],
|
||||
'conditions': [
|
||||
['runtime_link == "static"', {
|
||||
@ -53,6 +58,7 @@
|
||||
}]
|
||||
]
|
||||
}, {
|
||||
# Attempt to download pre-built libvips and install locally within node_modules
|
||||
'include_dirs': [
|
||||
'<(module_root_dir)/include',
|
||||
'<(module_root_dir)/include/glib-2.0',
|
||||
@ -108,10 +114,10 @@
|
||||
'-O3'
|
||||
],
|
||||
'xcode_settings': {
|
||||
'CLANG_CXX_LANGUAGE_STANDARD': 'c++11',
|
||||
'CLANG_CXX_LIBRARY': 'libc++',
|
||||
'MACOSX_DEPLOYMENT_TARGET': '10.7',
|
||||
'OTHER_CPLUSPLUSFLAGS': [
|
||||
'-std=c++11',
|
||||
'-stdlib=libc++',
|
||||
'-fexceptions',
|
||||
'-Wall',
|
||||
'-O3'
|
||||
@ -134,6 +140,7 @@
|
||||
],
|
||||
'conditions': [
|
||||
['OS == "win"', {
|
||||
# Windows lacks support for rpath
|
||||
'copies': [{
|
||||
'destination': '<(module_root_dir)/build/Release',
|
||||
'files': [
|
||||
|
5
circle.yml
Normal file
5
circle.yml
Normal file
@ -0,0 +1,5 @@
|
||||
machine:
|
||||
services:
|
||||
- docker
|
||||
test:
|
||||
override: ./packaging/test.sh
|
@ -1,5 +1,12 @@
|
||||
# Changelog
|
||||
|
||||
### v0.12 - "*look*"
|
||||
|
||||
#### v0.12.0 - TBD
|
||||
|
||||
* Bundle pre-compiled libvips and its dependencies for 64-bit Linux and Windows.
|
||||
[#42](https://github.com/lovell/sharp/issues/42)
|
||||
|
||||
### v0.11 - "*knife*"
|
||||
|
||||
#### v0.11.4 - 5<sup>th</sup> November 2015
|
||||
|
@ -25,6 +25,10 @@ Most recent 64-bit Linux-based operating systems should "just work", e.g.:
|
||||
* openSUSE 13.2
|
||||
* Archlinux 2015.06.01
|
||||
|
||||
Preference will be given to an existing globally-installed (via `pkg-config`)
|
||||
version of libvips that meets the minimum version requirement.
|
||||
This allows the use of newer versions of libvips with older versions of sharp.
|
||||
|
||||
For older and 32-bit Linux-based operating systems,
|
||||
a system-wide installation of the most suitable version of
|
||||
libvips and its dependencies can be achieved by running
|
||||
|
Loading…
x
Reference in New Issue
Block a user