Closed mightyaleksey closed 8 years ago
sure:
npm i bem-xjst
echo "" | bem-xjst -o bundle.bemhtml.js
const BEMHTML = require('./bundle.bemhtml.js');
BEMHTML.compile(function() {
block('b1').tag()('ololo');
block('b2').attrs()({ a: 'b' });
});
BEMHTML.apply({ block: 'b1', content: { block: 'b2' } }) // <ololo class="b1"><div class="b2" a="b"></div></ololo>
Surprisingly it works :) Will be it possible to skip the bundling step in future?
Thanks
Will be it possible to skip the bundling step in future?
we will investigate the way bundling works now as it makes gathering coverage somewhat hard. if we'll find a way how to avoid it, we'll definitely let users know.
Hi,
I'd like to make a webpack-loader for bemhtml and I lack possibility to use bemhtml as a commonjs module. Something similar to bem/bh:
Is it possible?
Kind regards, Alexey