Changed mozjpeg module and install nasm in travis.
Replaced mozjpeg with mozjpeg-bin. Now uses mozjpeg 2.0 and do the compilation during install instead of first run.
This commit is contained in:
Родитель
83d97bd53a
Коммит
4e58e89976
|
@ -5,6 +5,7 @@ node_js:
|
|||
before_install:
|
||||
- sudo apt-get update -qq
|
||||
- sudo apt-get install -qq ffmpeg
|
||||
- sudo apt-get install -qq nasm
|
||||
|
||||
notifications:
|
||||
irc:
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
## Requirements
|
||||
* [Node.js v10.0](http://nodejs.org)
|
||||
* [FFmpeg](http://ffmpeg.org/)
|
||||
* mozjpeg build dependencies (see [mozjpeg build requirements](https://github.com/mozilla/mozjpeg/blob/master/BUILDING.txt))
|
||||
|
||||
## Installation
|
||||
Get the code first.
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
var fs = require('fs');
|
||||
var temp = require ('temp');
|
||||
var execFile = require('child_process').execFile;
|
||||
var mozjpeg = require('mozjpeg').path;
|
||||
var jpegtran = require('mozjpeg-bin').jpegtran;
|
||||
var pngquant = require('pngquant-bin').path;
|
||||
var imgtype = require('imagetype');
|
||||
|
||||
|
@ -69,7 +69,7 @@ exports.handleResponse = function(request, source, dest) {
|
|||
}
|
||||
});
|
||||
} else if (type === 'jpeg') {
|
||||
execFile(mozjpeg,
|
||||
execFile(jpegtran,
|
||||
['-outfile', optPath, path],
|
||||
function(err, stdout, stderr) {
|
||||
if (err) {
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
"imagetype": "^0.3.0",
|
||||
"js-yaml": "^3.0.2",
|
||||
"memory-cache": "0.0.5",
|
||||
"mozjpeg": "^0.1.2",
|
||||
"mozjpeg-bin": "^0.2.0",
|
||||
"png": "~3.0.3",
|
||||
"pngquant-bin": "^0.3.1",
|
||||
"redis": "^0.10.3",
|
||||
|
|
Загрузка…
Ссылка в новой задаче