Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
37 lines (31 sloc) 779 Bytes
'use strict';
var bemxjst = require('bem-xjst'),
fs = require('fs');
console.log(Object.keys(bemxjst));
debugger;
var bundle = bemxjst.bemhtml.generate(function () {
block('group')(
tag()('ol'),
attrs()(function() {
return { title: this.ctx.title };
})
);
block('item')(
tag()('li'),
content()(function() {
return [
{
elem: 'label',
content: 'text:'
},
{
elem: 'text',
content: this.ctx.text
}
];
}),
elem('label').tag()('strong'),
elem('text').tag()('span')
);
});
fs.writeFileSync('template.js', bundle);
You can’t perform that action at this time.