Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

optipng-bin

Package Overview
Dependencies
Maintainers
7
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

optipng-bin - npm Package Compare versions

Comparing version 0.3.9 to 0.3.10

README.md

2

cli.js

@@ -5,5 +5,5 @@ #!/usr/bin/env node

var binPath = require('./').path;
var spawn = require('win-spawn');
var spawn = require('child_process').spawn;
spawn(binPath, process.argv.slice(2), { stdio: 'inherit' })
.on('exit', process.exit);

@@ -5,7 +5,15 @@ 'use strict';

var BinWrapper = require('bin-wrapper');
var chalk = require('chalk');
var fs = require('fs');
var logSymbols = require('log-symbols');
var path = require('path');
var pkg = require('./package.json');
/**
* Variables
*/
var BIN_VERSION = '0.7.5';
var BASE_URL = 'https://raw.github.com/imagemin/optipng-bin/' + pkg.version + '/vendor/';
/**
* Initialize a new BinWrapper

@@ -15,9 +23,9 @@ */

var bin = new BinWrapper()
.src('https://raw.github.com/imagemin/optipng-bin/0.3.9/vendor/osx/optipng', 'darwin')
.src('https://raw.github.com/imagemin/optipng-bin/0.3.9/vendor/linux/x86/optipng', 'linux', 'x86')
.src('https://raw.github.com/imagemin/optipng-bin/0.3.9/vendor/linux/x64/optipng', 'linux', 'x64')
.src('https://raw.github.com/imagemin/optipng-bin/0.3.9/vendor/freebsd/optipng', 'freebsd')
.src('https://raw.github.com/imagemin/optipng-bin/0.3.9/vendor/sunos/x86/optipng', 'sunos', 'x86')
.src('https://raw.github.com/imagemin/optipng-bin/0.3.9/vendor/sunos/x64/optipng', 'sunos', 'x64')
.src('https://raw.github.com/imagemin/optipng-bin/0.3.9/vendor/win/optipng.exe', 'win32')
.src(BASE_URL + 'osx/optipng', 'darwin')
.src(BASE_URL + 'linux/x86/optipng', 'linux', 'x86')
.src(BASE_URL + 'linux/x64/optipng', 'linux', 'x64')
.src(BASE_URL + 'freebsd/optipng', 'freebsd')
.src(BASE_URL + 'sunos/x86/optipng', 'sunos', 'x86')
.src(BASE_URL + 'sunos/x64/optipng', 'sunos', 'x64')
.src(BASE_URL + 'win/optipng.exe', 'win32')
.dest(path.join(__dirname, 'vendor'))

@@ -34,6 +42,6 @@ .use(process.platform === 'win32' ? 'optipng.exe' : 'optipng');

if (err) {
console.log(chalk.red('✗ pre-build test failed, compiling from source...'));
console.log(logSymbols.warning + ' pre-build test failed, compiling from source...');
var builder = new BinBuild()
.src('http://downloads.sourceforge.net/project/optipng/OptiPNG/optipng-0.7.5/optipng-0.7.5.tar.gz')
.src('http://downloads.sourceforge.net/project/optipng/OptiPNG/optipng-' + BIN_VERSION + '/optipng-' + BIN_VERSION + '.tar.gz')
.cfg('./configure --with-system-zlib --prefix="' + bin.dest() + '" --bindir="' + bin.dest() + '"')

@@ -44,10 +52,10 @@ .make('make install');

if (err) {
return console.log(chalk.red('✗ ' + err));
console.log(logSymbols.error, err);
}
console.log(chalk.green('✓ optipng built successfully'));
console.log(logSymbols.success + ' optipng built successfully!');
});
}
console.log(chalk.green('✓ pre-build test passed successfully'));
console.log(logSymbols.success + ' pre-build test passed successfully!');
});

@@ -54,0 +62,0 @@ }

{
"name": "optipng-bin",
"version": "0.3.9",
"version": "0.3.10",
"description": "OptiPNG wrapper that makes it seamlessly available as a local dependency on OS X, Linux, FreeBSD and Windows",

@@ -27,3 +27,3 @@ "license": "BSD",

"postinstall": "node index.js",
"test": "mocha --reporter list --timeout 0"
"test": "mocha --reporter list --timeout 50000"
},

@@ -45,3 +45,3 @@ "files": [

"bin-wrapper": "^0.3.0",
"chalk": "^0.4.0"
"log-symbols": "^1.0.0"
},

@@ -48,0 +48,0 @@ "devDependencies": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc