Skip to content

Commit d5d008f

Browse files
committedMar 15, 2021
Docs: reorder readme sections
1 parent 3b02134 commit d5d008f

File tree

2 files changed

+18
-13
lines changed

2 files changed

+18
-13
lines changed
 

‎README.md

+14-13
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ rotation, extraction, compositing and gamma correction are available.
1919
Most modern macOS, Windows and Linux systems running Node.js v10+
2020
do not require any additional install or runtime dependencies.
2121

22+
## Documentation
23+
24+
Visit [sharp.pixelplumbing.com](https://sharp.pixelplumbing.com/) for complete
25+
[installation instructions](https://sharp.pixelplumbing.com/install),
26+
[API documentation](https://sharp.pixelplumbing.com/api-constructor),
27+
[benchmark tests](https://sharp.pixelplumbing.com/performance) and
28+
[changelog](https://sharp.pixelplumbing.com/changelog).
29+
2230
## Examples
2331

2432
```sh
@@ -43,6 +51,7 @@ sharp(inputBuffer)
4351
sharp('input.jpg')
4452
.rotate()
4553
.resize(200)
54+
.jpeg({ mozjpeg: true })
4655
.toBuffer()
4756
.then( data => { ... })
4857
.catch( err => { ... });
@@ -84,23 +93,15 @@ readableStream
8493
.pipe(writableStream);
8594
```
8695

87-
[![Test Coverage](https://coveralls.io/repos/lovell/sharp/badge.svg?branch=master)](https://coveralls.io/r/lovell/sharp?branch=master)
88-
[![N-API v3](https://img.shields.io/badge/N--API-v3-green.svg)](https://nodejs.org/dist/latest/docs/api/n-api.html#n_api_n_api_version_matrix)
89-
90-
### Documentation
91-
92-
Visit [sharp.pixelplumbing.com](https://sharp.pixelplumbing.com/) for complete
93-
[installation instructions](https://sharp.pixelplumbing.com/install),
94-
[API documentation](https://sharp.pixelplumbing.com/api-constructor),
95-
[benchmark tests](https://sharp.pixelplumbing.com/performance) and
96-
[changelog](https://sharp.pixelplumbing.com/changelog).
97-
98-
### Contributing
96+
## Contributing
9997

10098
A [guide for contributors](https://github.com/lovell/sharp/blob/master/.github/CONTRIBUTING.md)
10199
covers reporting bugs, requesting features and submitting code changes.
102100

103-
### Licensing
101+
[![Test Coverage](https://coveralls.io/repos/lovell/sharp/badge.svg?branch=master)](https://coveralls.io/r/lovell/sharp?branch=master)
102+
[![N-API v3](https://img.shields.io/badge/N--API-v3-green.svg)](https://nodejs.org/dist/latest/docs/api/n-api.html#n_api_n_api_version_matrix)
103+
104+
## Licensing
104105

105106
Copyright 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Lovell Fuller and contributors.
106107

‎docs/README.md

+4
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ no child processes are spawned and Promises/async/await are supported.
5050

5151
### Optimal
5252

53+
The features of `mozjpeg` and `pngquant` can be used
54+
to optimise the file size of JPEG and PNG images respectively,
55+
without having to invoke separate `imagemin` processes.
56+
5357
Huffman tables are optimised when generating JPEG output images
5458
without having to use separate command line tools like
5559
[jpegoptim](https://github.com/tjko/jpegoptim) and

0 commit comments

Comments
 (0)
Please sign in to comment.