Skip to content

Commit 56c524c

Browse files
author
Alexandru Badiu
committed
fix(Downgrade sharp): Downgrade sharp so that we can install it on alpine distros.
1 parent 7442ef9 commit 56c524c

File tree

4 files changed

+36
-211
lines changed

4 files changed

+36
-211
lines changed

examples/example.js

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,6 @@ import ImageCache from '../dist/index';
33

44
const imagecache = new ImageCache(presets);
55

6-
imagecache.render('./in.png', 'test_sc', (err, image) => {
7-
if (err) {
8-
console.log('Failed to process image out_s_test_sc.png.');
9-
console.log(err);
10-
11-
return;
12-
}
13-
14-
image.toFile('out_s_test_sc.png', (saveErr, info) => {
15-
if (saveErr) {
16-
console.log('Failed to save image out_s_test_sc.png.');
17-
console.log(err);
18-
19-
return;
20-
}
21-
22-
console.log(`Saved image out_s_test_sc.png with width ${info.width} and height ${info.height}.`);
23-
});
24-
});
25-
266
imagecache.render('./in.png', 's_crop_tiny', (err, image) => {
277
if (err) {
288
console.log('Failed to process image out_s_crop_tiny.png.');

examples/presets.js

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,4 @@
11
module.exports = {
2-
test_sc: {
3-
presetname: 'test_sc',
4-
actions: [
5-
{
6-
action: 'scale_and_crop',
7-
config: {
8-
width: 152,
9-
height: 152,
10-
},
11-
},
12-
{
13-
action: 'define_canvas',
14-
config: {
15-
color: '#333333',
16-
width: 400,
17-
height: 400,
18-
},
19-
},
20-
{
21-
action: 'blur',
22-
},
23-
],
24-
},
252
s_crop_tiny: {
263
presetname: 's_crop_tiny',
274
actions: [

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@
4646
]
4747
},
4848
"dependencies": {
49-
"async": "^2.4.1",
50-
"sharp": "^0.18.1",
51-
"string": "^3.3.3"
49+
"async": "2.4.1",
50+
"sharp": "0.16.2",
51+
"string": "3.3.3"
5252
},
5353
"devDependencies": {
5454
"@semantic-release/condition-codeship": "^1.1.0",

0 commit comments

Comments
 (0)