Docs refresh

This commit is contained in:
Lovell Fuller 2017-10-01 19:00:38 +01:00
parent 99076edc89
commit d5873a00d5
5 changed files with 11 additions and 12 deletions

View File

@ -23,7 +23,7 @@ the installation of any external runtime dependencies.
## Examples
```javascript
import sharp from 'sharp';
const sharp = require('sharp');
```
```javascript
@ -33,8 +33,6 @@ sharp(inputBuffer)
// A Promises/A+ promise is returned when callback is not provided.
```
```javascript
sharp('input.jpg')
.rotate()

View File

@ -29,6 +29,7 @@ A Promises/A+ promise is returned when `callback` is not provided.
- `callback` **[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)?** called on completion with two arguments `(err, info)`.
`info` contains the output image `format`, `size` (bytes), `width`, `height`,
`channels` and `premultiplied` (indicating if premultiplication was used).
When using a crop strategy also contains `cropOffsetLeft` and `cropOffsetTop`.
- Throws **[Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error)** Invalid parameters
@ -102,8 +103,8 @@ Use these PNG options for output image.
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?**
- `options.progressive` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** use progressive (interlace) scan (optional, default `false`)
- `options.compressionLevel` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** zlib compression level (optional, default `6`)
- `options.adaptiveFiltering` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** use adaptive row filtering (optional, default `true`)
- `options.compressionLevel` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** zlib compression level, 0-9 (optional, default `9`)
- `options.adaptiveFiltering` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** use adaptive row filtering (optional, default `false`)
- `options.force` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** force PNG output, otherwise attempt to use input format (optional, default `true`)

View File

@ -55,9 +55,9 @@ without having to use separate command line tools like
[jpegoptim](https://github.com/tjko/jpegoptim) and
[jpegtran](http://jpegclub.org/jpegtran/).
PNG filtering can be disabled,
PNG filtering is disabled by default,
which for diagrams and line art often produces the same result
as [pngcrush](http://pmt.sourceforge.net/pngcrush/).
as [pngcrush](https://pmt.sourceforge.io/pngcrush/).
### Contributing

View File

@ -16,7 +16,7 @@ yarn add sharp
### Linux
[![Ubuntu 14.04 Build Status](https://travis-ci.org/lovell/sharp.png?branch=master)](https://travis-ci.org/lovell/sharp)
[![Ubuntu 16.04 Build Status](https://travis-ci.org/lovell/sharp.png?branch=master)](https://travis-ci.org/lovell/sharp)
[![Linux Build Status](https://circleci.com/gh/lovell/sharp.svg?style=svg&circle-token=6cb6d1d287a51af83722b19ed8885377fbc85e5c)](https://circleci.com/gh/lovell/sharp)
libvips and its dependencies are fetched and stored within `node_modules/sharp/vendor` during `npm install`.
@ -25,13 +25,13 @@ This involves an automated HTTPS download of approximately 7MB.
Most recent Linux-based operating systems with glibc running on x64 and ARMv6+ CPUs should "just work", e.g.:
* Debian 7, 8
* Ubuntu 12.04, 14.04, 16.04
* Ubuntu 14.04, 16.04
* Centos 7
* Fedora
* openSUSE 13.2
* Archlinux
* Raspbian Jessie
* Amazon Linux 2016.03, 2016.09
* Amazon Linux 2017.03.1
* Solus
To use a globally-installed version of libvips instead of the provided binaries,
@ -78,7 +78,7 @@ that it can be located using `pkg-config --modversion vips-cpp`.
[![Windows x64 Build Status](https://ci.appveyor.com/api/projects/status/pgtul704nkhhg6sg)](https://ci.appveyor.com/project/lovell/sharp)
libvips and its dependencies are fetched and stored within `node_modules\sharp\vendor` during `npm install`.
This involves an automated HTTPS download of approximately 11MB.
This involves an automated HTTPS download of approximately 12MB.
Only 64-bit (x64) `node.exe` is supported.

View File

@ -78,7 +78,7 @@
"devDependencies": {
"async": "^2.5.0",
"cc": "^1.0.1",
"documentation": "^4.0.0-rc.1",
"documentation": "^5.3.2",
"exif-reader": "^1.0.2",
"icc": "^1.0.0",
"mocha": "^3.5.0",