Comparing version 0.1.6 to 0.1.7
@@ -0,0 +0,0 @@ #!/usr/bin/env node |
34
index.js
@@ -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 = '1.83'; | ||
var BASE_URL = 'https://raw.github.com/imagemin/gifsicle-bin/v' + pkg.version + '/vendor/'; | ||
/** | ||
* Initialize a new BinWrapper | ||
@@ -15,9 +23,9 @@ */ | ||
var bin = new BinWrapper() | ||
.src('https://raw.github.com/imagemin/gifsicle-bin/0.1.6/vendor/osx/gifsicle', 'darwin') | ||
.src('https://raw.github.com/imagemin/gifsicle-bin/0.1.6/vendor/linux/x86/gifsicle', 'linux', 'x86') | ||
.src('https://raw.github.com/imagemin/gifsicle-bin/0.1.6/vendor/linux/x64/gifsicle', 'linux', 'x64') | ||
.src('https://raw.github.com/imagemin/gifsicle-bin/0.1.6/vendor/freebsd/x86/gifsicle', 'freebsd', 'x86') | ||
.src('https://raw.github.com/imagemin/gifsicle-bin/0.1.6/vendor/freebsd/x64/gifsicle', 'freebsd', 'x64') | ||
.src('https://raw.github.com/imagemin/gifsicle-bin/0.1.6/vendor/win/x86/gifsicle.exe', 'win32', 'x86') | ||
.src('https://raw.github.com/imagemin/gifsicle-bin/0.1.6/vendor/win/x86/gifsicle.exe', 'win32', 'x64') | ||
.src(BASE_URL + 'osx/gifsicle', 'darwin') | ||
.src(BASE_URL + 'linux/x86/gifsicle', 'linux', 'x86') | ||
.src(BASE_URL + 'linux/x64/gifsicle', 'linux', 'x64') | ||
.src(BASE_URL + 'freebsd/x86/gifsicle', 'freebsd', 'x86') | ||
.src(BASE_URL + 'freebsd/x64/gifsicle', 'freebsd', 'x64') | ||
.src(BASE_URL + 'win/x86/gifsicle.exe', 'win32', 'x86') | ||
.src(BASE_URL + 'win/x86/gifsicle.exe', 'win32', 'x64') | ||
.dest(path.join(__dirname, 'vendor')) | ||
@@ -34,6 +42,6 @@ .use(process.platform === 'win32' ? 'gifsicle.exe' : 'gifsicle'); | ||
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://www.lcdf.org/gifsicle/gifsicle-1.83.tar.gz') | ||
.src('http://www.lcdf.org/gifsicle/gifsicle-' + BIN_VERSION + '.tar.gz') | ||
.cfg('./configure --disable-gifview --disable-gifdiff --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('✓ gifsicle built successfully')); | ||
console.log(logSymbols.success + ' gifsicle 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": "gifsicle", | ||
"version": "0.1.6", | ||
"version": "0.1.7", | ||
"description": "gifsicle wrapper that makes it seamlessly available as a local dependency on OS X, Linux and Windows", | ||
@@ -19,3 +19,3 @@ "license": "BSD", | ||
"scripts": { | ||
"test": "mocha --reporter list --timeout 0", | ||
"test": "mocha --reporter list --timeout 50000", | ||
"postinstall": "node index.js" | ||
@@ -38,3 +38,3 @@ }, | ||
"bin-wrapper": "^0.3.0", | ||
"chalk": "^0.4.0" | ||
"log-symbols": "^1.0.0" | ||
}, | ||
@@ -41,0 +41,0 @@ "devDependencies": { |
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
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
58
4523
+ Addedlog-symbols@^1.0.0
+ Addedansi-regex@2.1.1(transitive)
+ Addedansi-styles@2.2.1(transitive)
+ Addedchalk@1.1.3(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedhas-ansi@2.0.0(transitive)
+ Addedlog-symbols@1.0.2(transitive)
+ Addedstrip-ansi@3.0.1(transitive)
+ Addedsupports-color@2.0.0(transitive)
- Removedchalk@^0.4.0
- Removedansi-styles@1.0.0(transitive)
- Removedchalk@0.4.0(transitive)
- Removedhas-color@0.1.7(transitive)
- Removedstrip-ansi@0.1.1(transitive)