Skip to content

Commit

Permalink
Require Node.js 10 (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
1000ch committed May 24, 2020
1 parent bf1fc91 commit 2f22fbe
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
@@ -1,7 +1,7 @@
language: node_js
node_js:
- '14'
- '12'
- '10'
- '8'
before_install:
- 'sudo chown $USER /usr/local'
10 changes: 5 additions & 5 deletions package.json
Expand Up @@ -8,7 +8,7 @@
"optipng": "cli.js"
},
"engines": {
"node": ">=8"
"node": ">=10"
},
"scripts": {
"postinstall": "node lib/install.js",
Expand All @@ -35,11 +35,11 @@
"logalot": "^2.0.0"
},
"devDependencies": {
"ava": "^1.4.1",
"ava": "^3.8.0",
"bin-check": "^4.0.1",
"compare-size": "^3.0.0",
"execa": "^1.0.0",
"tempy": "^0.3.0",
"xo": "^0.24.0"
"execa": "^4.0.0",
"tempy": "^0.5.0",
"xo": "^0.30.0"
}
}
10 changes: 5 additions & 5 deletions test/test.js
Expand Up @@ -16,24 +16,24 @@ test('rebuild the optipng binaries', async t => {
return;
}

const tmp = tempy.directory();
const temporary = tempy.directory();

await binBuild.file(path.resolve(__dirname, '../vendor/source/optipng.tar.gz'), [
`./configure --with-system-zlib --prefix="${tmp}" --bindir="${tmp}"`,
`./configure --with-system-zlib --prefix="${temporary}" --bindir="${temporary}"`,
'make install'
]);

t.true(fs.existsSync(path.join(tmp, 'optipng')));
t.true(fs.existsSync(path.join(temporary, 'optipng')));
});

test('return path to binary and verify that it is working', async t => {
t.true(await binCheck(optipng, ['--version']));
});

test('minify a PNG', async t => {
const tmp = tempy.directory();
const temporary = tempy.directory();
const sourcePath = path.join(__dirname, 'fixtures/test.png');
const destinationPath = path.join(tmp, 'test.png');
const destinationPath = path.join(temporary, 'test.png');
const arguments_ = [
'-strip',
'all',
Expand Down

0 comments on commit 2f22fbe

Please sign in to comment.