summaryrefslogtreecommitdiffstats
path: root/examples/parse.coffee
diff options
context:
space:
mode:
authormeltingice <meltingice8917@gmail.com>2012-04-21 15:53:47 -0400
committermeltingice <meltingice8917@gmail.com>2012-04-21 15:53:47 -0400
commitaeac3432b0379e1f73b8cc0383a87ac4c82e9c1b (patch)
tree454c1bde019c3fdb799913f00e09428e5ca34b53 /examples/parse.coffee
parentFix file data being included with image resources (diff)
downloadpsd.js-0.4.2.tar.xz
psd.js-0.4.2.zip
Fix bug with PSD adjustment layer effects getting file data into JSON exportv0.4.2
Diffstat (limited to 'examples/parse.coffee')
-rw-r--r--examples/parse.coffee5
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/parse.coffee b/examples/parse.coffee
index df55ba0..fbb93d0 100644
--- a/examples/parse.coffee
+++ b/examples/parse.coffee
@@ -10,3 +10,8 @@ if process.argv.length is 2
psd = PSD.fromFile process.argv[2]
psd.parse()
+
+data = psd.toJSON()
+
+fs.writeFile __dirname + "/output.json", JSON.stringify(data, null, "\t"), (err) ->
+ console.log "JSON data saved to output.json" \ No newline at end of file