directory-to-json
Write a representation of a directory to a JSON
file. Small wrapper
around directory-to-object.
Installation
$ npm install directory-to-json
Usage
const dtj =
API
dto(opts|inPath, outPath, callback)
// `noDot` ignores files which have a leading `.`// in the filename.const opts = noDot: true path: path
Why?
When parsing several directories of files it's nice to just have to provide a path rather than creating an index object manually. This is useful for creating static sites out of markdown files. Client-side projects can't call a read function dynamically however, so a static file must be created.