Socket
Socket
Sign inDemoInstall

optipng-bin

Package Overview
Dependencies
270
Maintainers
5
Versions
50
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.1.3 to 3.1.4

7

cli.js
#!/usr/bin/env node
'use strict';
const spawn = require('child_process').spawn;
const optipng = require('.');
var spawn = require('child_process').spawn;
var optipng = require('./');
var input = process.argv.slice(2);
const input = process.argv.slice(2);
spawn(optipng, input, {stdio: 'inherit'})
.on('exit', process.exit);
'use strict';
const path = require('path');
const BinWrapper = require('bin-wrapper');
const pkg = require('../package.json');
var path = require('path');
var BinWrapper = require('bin-wrapper');
var pkg = require('../package.json');
var url = 'https://raw.githubusercontent.com/imagemin/optipng-bin/v' + pkg.version + '/vendor/';
const url = `https://raw.githubusercontent.com/imagemin/optipng-bin/v${pkg.version}/vendor/`;
module.exports = new BinWrapper()
.src(`${url}macos/optipng`, 'darwin')
.src(`${url}linux/x86/optipng`, 'linux', 'x86')
.src(`${url}linux/x64/optipng`, 'linux', 'x64')
.src(`${url}freebsd/x86/optipng`, 'freebsd', 'x86')
.src(`${url}freebsd/x64/optipng`, 'freebsd', 'x64')
.src(`${url}sunos/x86/optipng`, 'sunos', 'x86')
.src(`${url}sunos/x64/optipng`, 'sunos', 'x64')
.src(`${url}win/optipng.exe`, 'win32')
.dest(path.resolve(__dirname, '../vendor'))
.src(url + 'macos/optipng', 'darwin')
.src(url + 'linux/x86/optipng', 'linux', 'x86')
.src(url + 'linux/x64/optipng', 'linux', 'x64')
.src(url + 'freebsd/x86/optipng', 'freebsd', 'x86')
.src(url + 'freebsd/x64/optipng', 'freebsd', 'x64')
.src(url + 'sunos/x86/optipng', 'sunos', 'x86')
.src(url + 'sunos/x64/optipng', 'sunos', 'x64')
.src(url + 'win/optipng.exe', 'win32')
.dest(path.join(__dirname, '../vendor'))
.use(process.platform === 'win32' ? 'optipng.exe' : 'optipng');
'use strict';
const BinBuild = require('bin-build');
const log = require('logalot');
const bin = require('.');
var BinBuild = require('bin-build');
var log = require('logalot');
var bin = require('./');
bin.run(err => {
bin.run(function (err) {
if (err) {

@@ -14,5 +14,8 @@ log.warn(err.message);

.src('https://downloads.sourceforge.net/project/optipng/OptiPNG/optipng-0.7.6/optipng-0.7.6.tar.gz')
.cmd(`./configure --with-system-zlib --prefix="${bin.dest()}" --bindir="${bin.dest()}"`)
.cmd([
'./configure --with-system-zlib --prefix="' + bin.dest() + '"',
'--bindir="' + bin.dest() + '"'
].join(' '))
.cmd('make install')
.run(err => {
.run(function (err) {
if (err) {

@@ -19,0 +22,0 @@ log.error(err.stack);

{
"name": "optipng-bin",
"version": "3.1.3",
"version": "3.1.4",
"description": "OptiPNG wrapper that makes it seamlessly available as a local dependency",

@@ -23,11 +23,11 @@ "license": "MIT",

],
"engines": {
"node": ">=0.10.0"
},
"bin": {
"optipng": "cli.js"
},
"engines": {
"node": ">=4"
},
"scripts": {
"postinstall": "node lib/install.js",
"test": "xo && ava"
"test": "xo && mocha --timeout 50000"
},

@@ -40,3 +40,2 @@ "files": [

"keywords": [
"imagemin",
"compress",

@@ -47,7 +46,6 @@ "image",

"optimize",
"png",
"optipng"
"png"
],
"dependencies": {
"bin-build": "^2.2.0",
"bin-build": "^2.0.0",
"bin-wrapper": "^3.0.0",

@@ -57,9 +55,10 @@ "logalot": "^2.0.0"

"devDependencies": {
"ava": "*",
"bin-check": "^4.0.1",
"compare-size": "^3.0.0",
"execa": "^0.6.3",
"tempy": "^0.1.0",
"bin-check": "^1.0.0",
"compare-size": "^1.0.1",
"mkdirp": "^0.5.0",
"mocha": "^2.2.4",
"path-exists": "^1.0.0",
"rimraf": "^2.3.2",
"xo": "*"
}
}

@@ -5,5 +5,3 @@ # optipng-bin [![Build Status](https://travis-ci.org/imagemin/optipng-bin.svg?branch=master)](https://travis-ci.org/imagemin/optipng-bin)

You probably want [`imagemin-optipng`](https://github.com/imagemin/imagemin-optipng) instead.
## Install

@@ -41,2 +39,2 @@

MIT © [Imagemin](https://github.com/imagemin)
MIT © [imagemin](https://github.com/imagemin)

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc