-
### How to reproduce:
1. Create new project with project-stub and `bem make`
2. Create `desktop.bundles/index/index.node.js` with the following content:
``` js
var Vow = require('../../libs/bem-core/…
-
Let's use `mods()({ ... my mods ... })` expr in BEMHTML.js instead of
``` js
def()(function(){
this.ctx.mods = this.extend(this.ctx.mods || {}, { ... my mods ... });
return applyNext();
})
``…
-
Following commits are backward compatible and may be released as `4.3.0`: https://github.com/bem/bem-xjst/compare/v4.2.7...04ec2b0f
-
Важно понимать, что BEM-XJST online demo использует данные, которые закэшировались в браузере, поэтому, нельзя рассчитывать, что у того, кто смотрит презентацию, там окажется тот же код, что и у тебя.…
-
``` js
it('should merge class from attrs and bem class', function() {
test(function() {
block('b').attrs()(function() {
return { class: 'test' };
});
}, { block: 'b' }, '…
-
there is crazy non-realistic idea...
move service stuff in something like `this._`, because its are used rarely.
and move block's `params` from `this.ctx` to `this`, because its are used frequently
-
``` js
// ./src/components/button/button.bemhtml.js
block('button')(
tag()(function() {
return require('./button.js');
})
);
```
-
Шаг 5, походу не работает пример:
``` js
block('hello')(
content()(function() {
return (this.ctx.names || [this.ctx.name]).map(function(user) {
return { elem: 'item', content:…
-
For avoid copy-paste of `[{ block: 'b1' }].concat(this.ctx.mix)` we can introduce two new helpers: for construct or convert to array with adding argument after and for inplace modification of `mix` fi…
veged updated
8 years ago
-
I think, it should check is the `item` truthy: `if (item)...`
https://github.com/bem/bem-xjst/blob/8b650e78f211f3e5ca1c7897f325a7d8830779ab/lib/bemhtml/index.js#L208