Analyse markdown to html for nodejs.
npm install @juexro/markdown2html 
Depend on markdown-it、 highlight.js, analyse markdown to html for nodejs.
```
yarn add @juexro/markdown2html -D
markdown
`js
---
title: demo
date: 2018/11/22 17:27:56
---
You can add key-values between
--- --- at the top. And get info in beforeOuput meta.---
nodejs
`js
const fs = require('fs')
const MarkdownAnalyse = require('@juexro/markdown2html')
const minify = require('html-minifier').minify
new MarkdownAnalyse({
cleanDir: true,
filePath: ['markdown/foo.md', 'markdown/bar'],
outputPath: 'html',
beforeOutput ({content, meta, outputFilePath} = {}, md) {
return minify(, {
removeComments: true,
collapseWhitespace: true,
minifyCSS: true
})
}
}).run()
`options
| Name | Type | Description |
|---------|--------|-------------|
| cleanDir | Boolean | remove outputPath directory at first |
| filePath | Array\|String | file path or directory |
| outputPath | String | output directory |
| beforeOutput | Function |
@param {*} [{outputFilePath, meta, content}={}, md], you can use md.render` to render your markdown template.