jpegtran-bin
Advanced tools
Comparing version 0.1.3 to 0.1.4
52
build.js
@@ -8,34 +8,36 @@ 'use strict'; | ||
which('make', function (err) { | ||
if (err) { | ||
return console.log(err.red); | ||
} | ||
module.exports = function () { | ||
if (process.platform === 'darwin' || process.platform === 'linux') { | ||
var binDir = path.dirname(binPath); | ||
var configureFlags = '--disable-shared '; | ||
which('make', function (err) { | ||
if (err) { | ||
return console.log(err); | ||
} | ||
if (process.platform === 'darwin') { | ||
configureFlags += '--host i686-apple-darwin '; | ||
} | ||
var binDir = path.dirname(binPath); | ||
var configureFlags = '--disable-shared '; | ||
if (process.platform === 'linux' && process.arch === 'x64') { | ||
configureFlags += 'CFLAGS=\'-O3 -m64\' LDFLAGS=-m64'; | ||
} else { | ||
configureFlags += 'CFLAGS=\'-O3 -m32\' LDFLAGS=-m32'; | ||
} | ||
if (process.platform === 'darwin') { | ||
configureFlags += '--host i686-apple-darwin '; | ||
} | ||
var buildScript = './configure ' + configureFlags + ' &&' + | ||
'make install prefix=' + __dirname + | ||
'/libjpeg-turbo/ bindir=' + binDir + | ||
' bin_PROGRAMS=jpegtran'; | ||
exec(buildScript, { cwd: './libjpeg-turbo/' }, function (err) { | ||
if (err) { | ||
return console.log(err); | ||
if (process.platform === 'linux' && process.arch === 'x64') { | ||
configureFlags += 'CFLAGS=\'-O3 -m64\' LDFLAGS=-m64'; | ||
} else { | ||
configureFlags += 'CFLAGS=\'-O3 -m32\' LDFLAGS=-m32'; | ||
} | ||
console.log('libjpeg-turbo rebuilt successfully'.green); | ||
var buildScript = './configure ' + configureFlags + ' &&' + | ||
'make install prefix=' + __dirname + | ||
'/libjpeg-turbo/ bindir=' + binDir + | ||
' bin_PROGRAMS=jpegtran'; | ||
exec(buildScript, { cwd: './libjpeg-turbo/' }, function (err) { | ||
if (err) { | ||
return console.log(err); | ||
} | ||
console.log('libjpeg-turbo rebuilt successfully'.green); | ||
}); | ||
}); | ||
} | ||
}); | ||
}; |
{ | ||
"name": "jpegtran-bin", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "jpegtran (part of libjpeg-turbo) wrapper that makes it seamlessly available as a local dependency on OS X, Linux and Windows. Most commonly used to losslessly minify JPEG images.", | ||
@@ -21,2 +21,7 @@ "keywords": [ | ||
}, | ||
"maintainers": [ | ||
{ | ||
"name": "Duncan Wong" | ||
} | ||
], | ||
"main": "lib/jpegtran-bin.js", | ||
@@ -29,4 +34,4 @@ "bin": "bin/jpegtran-bin", | ||
"scripts": { | ||
"test": "mocha test/test-*.js", | ||
"postinstall": "node build.js" | ||
"test": "mocha", | ||
"postinstall": "node pre-build.js" | ||
}, | ||
@@ -43,7 +48,5 @@ "engines": { | ||
"colors": "~0.6.0", | ||
"which": "~1.0.5" | ||
}, | ||
"devDependencies": { | ||
"mocha": "~1.6.0" | ||
"which": "~1.0.5", | ||
"mocha": "~1.9.0" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
11833253
0
830
2111
3
3
159
+ Addedmocha@~1.9.0
+ Addedcommander@0.6.1(transitive)
+ Addeddebug@4.3.7(transitive)
+ Addeddiff@1.0.2(transitive)
+ Addedgrowl@1.7.0(transitive)
+ Addedjade@0.26.3(transitive)
+ Addedmkdirp@0.3.00.3.3(transitive)
+ Addedmocha@1.9.0(transitive)
+ Addedms@0.3.02.1.3(transitive)