Complimentary lib to parser-cache. Extends the `Parsers` prototype with additional methods for reading files from the file system.
npm install parse-files
> Complimentary lib to parser-cache. Extends the Parsers prototype with additional methods for reading files from the file system.
``bash`
npm i parse-files --save-dev
`js`
var Parsers = require('parse-files');
var parsers = new Parsers();
Asynchronously read and parse a file at the given filepath and callback next(err, str).
* filepath {String}: The file to parse. options
* {Object|Function}: or next function. next
* {Function}: Callback function.
Example:
`js`
parsers.parseFile('docs/abc.md', function (err, file) {
console.log(file);
});
Synchronously read and parse a glob of files from the given patterns and callback next(err, str). Options are passed to [globby] and .parseFile().
* glob {String}: Glob patterns to use for files to parse. options
* {Object|Function}: or next function. next
* {Function}: Callback function.
Example:
`js``
parsers.parseFiles('docs/*.md', function (err, files) {
console.log(files);
});
* parser-cache
* parser-noop
* parser-front-matter
Jon Schlinkert
+ github/jonschlinkert
+ twitter/jonschlinkert
*
_This file was generated by verb-cli on August 27, 2014._
[gray-matter]: https://github.com/jonschlinkert/gray-matter
[globby]: https://github.com/sindresorhus/globby