posthtml-bemjson
v1.0.1
Published
Convert PostHTML tree to Bemjson tree
Downloads
3
Maintainers
Readme
PostHTML-bemjson
PostHTML plugin to convert PostHTML tree to Bemjson tree
Usage
var posthtml = require('posthtml'),
html = '<html><head><title>Wow</title></head><body><div class="button"><div class="button__text">Text</div></div></body></html>';
var bemjson = posthtml()
.use(require('posthtml-bemjson'))
.process(html, { sync: true }).tree;
Test
npm run test