Thanks for share this plugin.
I've been using since a couple of months this plugin and it works great.
But I have a little problem, is possible make metalsmith-metadata-directory ignore empty json file?
When I start a project, my data.json file is empty.
SyntaxError: Unexpected end of input
at Object.parse (native)
at /Users/Rodrigo/Projects/web-blog-metalsmith-njk/node_modules/metalsmith-metadata-directory/lib/index.js:42:25
at /Users/Rodrigo/Projects/web-blog-metalsmith-njk/node_modules/metalsmith-metadata-directory/node_modules/async/dist/async.js:4700:20
at replenish (/Users/Rodrigo/Projects/web-blog-metalsmith-njk/node_modules/metalsmith-metadata-directory/node_modules/async/dist/async.js:873:21)
at /Users/Rodrigo/Projects/web-blog-metalsmith-njk/node_modules/metalsmith-metadata-directory/node_modules/async/dist/async.js:883:15
at eachLimit (/Users/Rodrigo/Projects/web-blog-metalsmith-njk/node_modules/metalsmith-metadata-directory/node_modules/async/dist/async.js:4725:33)
at Object.<anonymous> (/Users/Rodrigo/Projects/web-blog-metalsmith-njk/node_modules/metalsmith-metadata-directory/node_modules/async/dist/async.js:929:20)
at /Users/Rodrigo/Projects/web-blog-metalsmith-njk/node_modules/metalsmith-metadata-directory/lib/index.js:38:13
at f (/Users/Rodrigo/Projects/web-blog-metalsmith-njk/node_modules/once/once.js:17:25)
at Glob.<anonymous> (/Users/Rodrigo/Projects/web-blog-metalsmith-njk/node_modules/metalsmith-metadata-directory/node_modules/glob/glob.js:146:7)
at emitOne (events.js:90:13)
at Glob.emit (events.js:182:7)
at Glob._finish (/Users/Rodrigo/Projects/web-blog-metalsmith-njk/node_modules/metalsmith-metadata-directory/node_modules/glob/glob.js:194:8)
at done (/Users/Rodrigo/Projects/web-blog-metalsmith-njk/node_modules/metalsmith-metadata-directory/node_modules/glob/glob.js:179:14)
at Glob._processReaddir2 (/Users/Rodrigo/Projects/web-blog-metalsmith-njk/node_modules/metalsmith-metadata-directory/node_modules/glob/glob.js:431:12)
at /Users/Rodrigo/Projects/web-blog-metalsmith-njk/node_modules/metalsmith-metadata-directory/node_modules/glob/glob.js:368:17
There any way to do that if the file is empty, do not run the metalsmith-metadata-directory or ignore, like a plugin option?
Thanks in advance.