summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-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