Convart PSD layout to JSON.
First, install this module in your project.
$ npm install psd2json
Import this module to your source code and call like below.
var psd2json = require('psd2json');
var jsonData = psd2json('./target.psd'); // return JSON
var jsonData = psd2json('./target.psd', './outdir'); // return JSON and output /outdir/target.json /outdir/target/*.png
var jsonData = psd2json('./target.psd', {outJsonDir:'./outdir'}); // return JSON and output /outdir/target.json
var jsonData = psd2json('./target.psd', {outImgDir:'./outdir'}); // return JSON and output /outdir/target/*.png
This software is released under the MIT License, see LICENSE