0.2.0 • Published 7 years ago
md-2-bemjson v0.2.0
md-2-bemjson
Converts .md
files to .bemjson.js
files.
Requirements
Install
$ npm install md-2-bemjson
Usage
const toBemjson = require('md-2-bemjson');
const bemjson = toBemjson.convertSync('# Hello world');
console.log(JSON.parse(bemjson));
Yields:
{
"block": "documentation",
"content": {
"block": "paragraph",
"content": "#hello world"
}
}
API
toBemjson.convertSync(md[, options])
options
All options are passed to remark-bemjson
.
License
Code and documentation copyright 2017 YANDEX LLC. Code released under the Mozilla Public License 2.0.