0.2.0 • Published 7 years ago

md-2-bemjson v0.2.0

Weekly downloads
1
License
MPL-2.0
Repository
github
Last release
7 years ago

md-2-bemjson

Converts .md files to .bemjson.js files.

NPM Status Travis Status Coverage Status Dependency Status Greenkeeper badge

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.