Comparing version 0.1.7 to 0.1.8
40
index.js
@@ -33,25 +33,29 @@ 'use strict'; | ||
if (!exists) { | ||
var args = [ | ||
'-copy', 'none', | ||
'-outfile', path.join(__dirname, 'test/fixtures/test-optimized.jpg'), | ||
path.join(__dirname, 'test/fixtures/test.jpg') | ||
]; | ||
} | ||
bin.run(args, function (err) { | ||
if (err) { | ||
console.log(logSymbols.warning + ' pre-build test failed, compiling from source...'); | ||
bin.run(['--version'], function (err) { | ||
if (err) { | ||
console.log(logSymbols.warning + ' pre-build test failed, compiling from source...'); | ||
var builder = new BinBuild() | ||
.src('https://github.com/mozilla/mozjpeg/archive/v' + BIN_VERSION + '.tar.gz') | ||
.cmd('autoreconf -fiv && ./configure --prefix="' + bin.dest() + '" --bindir="' + bin.dest() + '" --libdir="' + bin.dest() + '"') | ||
.cmd('make && make install'); | ||
var builder = new BinBuild() | ||
.src('https://github.com/mozilla/mozjpeg/archive/v' + BIN_VERSION + '.tar.gz') | ||
.cfg('autoreconf -fiv && ./configure --prefix="' + bin.dest() + '" --bindir="' + bin.dest() + '" --libdir="' + bin.dest() + '"') | ||
.make('make && make install'); | ||
return builder.build(function (err) { | ||
if (err) { | ||
console.log(logSymbols.error, err); | ||
} | ||
return builder.build(function (err) { | ||
if (err) { | ||
console.log(logSymbols.error, err); | ||
} | ||
console.log(logSymbols.success + ' mozjpeg built successfully!'); | ||
}); | ||
} | ||
console.log(logSymbols.success + ' mozjpeg built successfully!'); | ||
}); | ||
} | ||
console.log(logSymbols.success + ' pre-build test passed successfully!'); | ||
}); | ||
console.log(logSymbols.success + ' pre-build test passed successfully!'); | ||
}); | ||
} | ||
}); | ||
@@ -58,0 +62,0 @@ |
{ | ||
"name": "mozjpeg", | ||
"version": "0.1.7", | ||
"version": "0.1.8", | ||
"description": "mozjpeg wrapper that makes it seamlessly available as a local dependency", | ||
@@ -24,3 +24,4 @@ "license": "MIT", | ||
"cli.js", | ||
"index.js" | ||
"index.js", | ||
"test" | ||
], | ||
@@ -38,3 +39,3 @@ "keywords": [ | ||
"dependencies": { | ||
"bin-build": "^0.1.0", | ||
"bin-build": "^0.2.0", | ||
"bin-wrapper": "^0.3.0", | ||
@@ -41,0 +42,0 @@ "log-symbols": "^1.0.0" |
101143
7
109
3
2
+ Addedbin-build@0.2.0(transitive)
- Removedbin-build@0.1.1(transitive)
Updatedbin-build@^0.2.0