From 3b0eca522b1e5df282fa1d3bf1c0a8a440a41c98 Mon Sep 17 00:00:00 2001 From: Shane Osbourne Date: Wed, 2 Jul 2014 17:58:51 +0100 Subject: [PATCH] Added an option to 'pretty print' the json output --- index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index e9b7bb9..ea147b7 100644 --- a/index.js +++ b/index.js @@ -21,6 +21,8 @@ var firstFile = null; + var spaces = options && options.spaces ? options.spaces : 0; + var wp = new Parser(options); var bufferFiles = function(file, enc, next){ @@ -45,7 +47,7 @@ var data; try{ - data = JSON.stringify(wp.complete()); + data = JSON.stringify(wp.complete(), null, spaces); // data = parser(options, filemap)); }catch(e){ return this.emit('error', new PluginError('gulp-jsdoc',