bem-contrib / html2bemjson

html to bemjson converter
30 stars 2 forks source link

Support custom bem-naming #1

Closed blond closed 9 years ago

blond commented 9 years ago

It is necessary to allow users to specify bem-naming options.

var html2bemjson = require('html2bemjson');
var html = '<div class="block--mod"></div>';

html2bemjson.convert(html, { naming: { elem: '__', mod: '--' } }); // { block: 'block' mods: { mod: true }