Skip to content

Commit

Permalink
Require Node.js 6, use Travis to test on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
1000ch committed Jan 14, 2019
1 parent 16c30c5 commit 24de88a
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 35 deletions.
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
7 changes: 5 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
sudo: false
os:
- linux
- windows
language: node_js
node_js:
- '10'
- '8'
- '6'
- '4'
20 changes: 0 additions & 20 deletions appveyor.yml

This file was deleted.

6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ module.exports = opts => buf => {
input: buf,
bin: guetzli,
args
}).catch(err => {
err.message = err.stderr || err.message;
throw err;
}).catch(error => {
error.message = error.stderr || error.message;
throw error;
});
};
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
}
],
"engines": {
"node": ">=4"
"node": ">=6"
},
"scripts": {
"test": "xo && ava"
Expand All @@ -48,14 +48,14 @@
],
"dependencies": {
"exec-buffer": "^3.1.0",
"guetzli": "^1.0.0",
"is-jpg": "^1.0.0",
"guetzli": "^2.0.0",
"is-jpg": "^2.0.0",
"is-png": "^1.1.0",
"number-is-integer": "^1.0.1"
},
"devDependencies": {
"ava": "*",
"pify": "^2.3.0",
"xo": "*"
"ava": "^1.1.0",
"pify": "^4.0.1",
"xo": "^0.23.0"
}
}
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# imagemin-guetzli [![Build Status](https://travis-ci.org/imagemin/imagemin-guetzli.svg?branch=master)](https://travis-ci.org/imagemin/imagemin-guetzli) [![Build status](https://ci.appveyor.com/api/projects/status/7wxmyhxee0i8b7d9/branch/master?svg=true)](https://ci.appveyor.com/project/bradbaris/imagemin-guetzli)
# imagemin-guetzli [![Build Status](https://travis-ci.org/imagemin/imagemin-guetzli.svg?branch=master)](https://travis-ci.org/imagemin/imagemin-guetzli)

> [Guetzli](https://github.com/google/guetzli) imagemin plugin
Expand Down Expand Up @@ -79,7 +79,7 @@ Please note that JPEG images do not support alpha channel (transparency). If the
Type: `number`<br>
Default: `6000`

Memory limit in MB. Guetzli will fail if unable to stay under the limit.
Memory limit in MB. Guetzli will fail if unable to stay under the limit.
Note: Currently, in `imagemin-guetzli`, this will fail silently as the error is not passed along.

##### nomemlimit
Expand Down
6 changes: 4 additions & 2 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import path from 'path';
import isJpg from 'is-jpg';
import pify from 'pify';
import test from 'ava';
import m from './';
import m from '.';

const fsP = pify(fs);
let buf;
Expand All @@ -27,5 +27,7 @@ test('skip optimizing a non-PNG/JPG file', async t => {
});

test('check if --quality flag works', async t => {
await t.notThrows(m({quality: 85})(buf));
await t.notThrowsAsync(async () => {
await m({quality: 85})(buf);
});
});

0 comments on commit 24de88a

Please sign in to comment.