From acf3f8e95c9ad738036f7ee017d9f3fba62f9581 Mon Sep 17 00:00:00 2001 From: Kiong Date: Wed, 23 Mar 2016 15:38:16 +0800 Subject: [PATCH 1/2] Add file:/// to page.open to prevent error from PhantomJS being unable to read files from file system --- render.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/render.js b/render.js index e3ca7d4..687220e 100644 --- a/render.js +++ b/render.js @@ -40,7 +40,7 @@ function exec(commands, done) { done && done(e); return; } - page.open(svgfile, function(status) { + page.open('file:///'+svgfile, function(status) { if (status !== 'success') { var err = 'Error: Unable to load file (' + status + '): ' + svgfile; done && done(err); From 56c7edf7569ba7d533a5dab71aa449fbe6608975 Mon Sep 17 00:00:00 2001 From: Kiong Date: Thu, 24 Mar 2016 11:17:06 +0800 Subject: [PATCH 2/2] Commit to break away from original fork --- README.md | 16 +++++++++++++++- package.json | 11 ++++++----- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index fabba54..c912767 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,18 @@ -# svgexport +# svgexport 2 # + +This is a fork from the original svgexport module. This fixes the issue of + +``` +Unable to load file (fail) : +``` + +Do file an issue / a pull request if there are any feedbacks. + +---------- + +# Below here is from the original svgexport module # + +## svgexport svgexport is a Node.js module and command-line tool for exporting SVG files to PNG and JPEG, it uses PhantomJS for rendering SVG files. diff --git a/package.json b/package.json index 151f58f..eacb745 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "svgexport", - "version": "0.3.0", - "description": "Node.js module and command-line tool for exporting SVG to PNG and JPEG.", - "author": "Ali Shakiba", + "name": "svgexport2", + "version": "0.4.0", + "description": "A fork from the original svgexport module. This supports the latest PhantomJS upgarde. The original svgexport module states: This is a node.js module and command-line tool for exporting SVG to PNG and JPEG.", + "author": "Kiong", "keywords": [ "svg", "export", @@ -20,8 +20,9 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/shakiba/svgexport.git" + "url": "https://github.com/tlkiong/svgexport.git" }, + "bugs": "https://github.com/tlkiong/svgexport/issues", "dependencies": { "async": "^1.5.2", "phantomjs-prebuilt": "^2.1.4"