summaryrefslogtreecommitdiffstats
path: root/lib/utils/images.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-09-15 13:57:21 +0200
committerSamy Pessé <samypesse@gmail.com>2015-09-15 13:57:21 +0200
commit5a205346e3d125b1c834220ce98a206d88697811 (patch)
tree47700546d3b7a3e484975e37b1bb06e7efa88b92 /lib/utils/images.js
parente1930046599d430a6bb378af62bce78fb9d24ff7 (diff)
downloadgitbook-5a205346e3d125b1c834220ce98a206d88697811.zip
gitbook-5a205346e3d125b1c834220ce98a206d88697811.tar.gz
gitbook-5a205346e3d125b1c834220ce98a206d88697811.tar.bz2
Jshint all files
Diffstat (limited to 'lib/utils/images.js')
-rw-r--r--lib/utils/images.js12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/utils/images.js b/lib/utils/images.js
index 3bc650a..a82b0a1 100644
--- a/lib/utils/images.js
+++ b/lib/utils/images.js
@@ -1,9 +1,7 @@
var _ = require("lodash");
var Q = require("q");
var fs = require("./fs");
-var spawn = require('spawn-cmd').spawn;
-
-var links = require("./links");
+var spawn = require("spawn-cmd").spawn;
// Convert a svg file
var convertSVG = function(source, dest, options) {
@@ -14,16 +12,16 @@ var convertSVG = function(source, dest, options) {
});
- //var command = shellescape(['svgexport', source, dest]);
- var child = spawn('svgexport', [source, dest]);
+ //var command = shellescape(["svgexport", source, dest]);
+ var child = spawn("svgexport", [source, dest]);
child.on("error", function(error) {
- if (error.code == "ENOENT") error = new Error("Need to install 'svgexport' using 'npm install svgexport -g'");
+ if (error.code == "ENOENT") error = new Error("Need to install \"svgexport\" using \"npm install svgexport -g\"");
return d.reject(error);
});
child.on("close", function(code) {
- if (code == 0 && fs.existsSync(dest)) {
+ if (code === 0 && fs.existsSync(dest)) {
d.resolve();
} else {
d.reject(new Error("Error converting "+source+" into "+dest));