barnes-markdown
v0.1.0-alpha.b035843b
Published
Convert CommonMark Markdown to HTML with the MarkdownIt library.
Downloads
3
Readme
Barnes-Markdown
Convert CommonMark Markdown to HTML with the MarkdownIt library.
Installation
yarn add barnes-markdown
Usage
import Barnes from 'barnes';
import mkdown from 'barnes-markdown';
// optionally pass an options object or MarkdownIt instance
import { opts, markdown } from './config';
(async () => {
await new Barnes('/Users/Dev/Documents')
.read('**/*.md')
// convert to markdown
.map(mkdown(opts, markdown))
// all markdown files are now html
.write('public');
}());