diff --git a/lib/PngQuant.js b/lib/PngQuant.js index f99ff57..c07a633 100644 --- a/lib/PngQuant.js +++ b/lib/PngQuant.js @@ -1,4 +1,4 @@ -/*jshint node: true */ +/* jshint node: true */ const childProcess = require('child_process'); const Stream = require('stream').Stream; const util = require('util'); @@ -89,7 +89,7 @@ PngQuant.prototype.write = function(chunk) { } this.commandLine = pngCrushBinaryPath + - (this.pngQuantArgs ? ' ' + this.pngQuantArgs.join(' ') : ''); // For debugging + (this.pngQuantArgs ? ` ${ this.pngQuantArgs.join(' ')}` : ''); // For debugging this.pngQuantProcess = childProcess.spawn( pngCrushBinaryPath, this.pngQuantArgs @@ -102,7 +102,7 @@ PngQuant.prototype.write = function(chunk) { if (!this.hasEnded) { this._error( new Error( - 'Saw pngquant output on stderr: ' + data.toString('ascii') + `Saw pngquant output on stderr: ${ data.toString('ascii')}` ) ); this.hasEnded = true; @@ -116,8 +116,8 @@ PngQuant.prototype.write = function(chunk) { if (exitCode > 0 && !this.hasEnded) { this._error( new Error( - 'The pngquant process exited with a non-zero exit code: ' + - exitCode + `The pngquant process exited with a non-zero exit code: ${ + exitCode}` ) ); this.hasEnded = true; diff --git a/test/PngQuant.js b/test/PngQuant.js index f1b5ae7..5e56e28 100644 --- a/test/PngQuant.js +++ b/test/PngQuant.js @@ -1,4 +1,4 @@ -/*global describe, it, beforeEach, afterEach, setTimeout, __dirname*/ +/* global describe, it, beforeEach, afterEach, setTimeout, __dirname */ const expect = require('unexpected') .clone() .use(require('unexpected-stream'))