-
For keyset `kk` and key `k1`:
``` json
{
"kk" : {
"k1" : "blah content"
}
}
```
BEMJSON
``` bemjson.js
{ block : 'i-bem', elem : 'i18n', keyset : 'kk', key : 'k1', content : {
block : …
narqo updated
11 years ago
-
В скомпиллированном шаблоне, в секции функции `applyc` «появляется» вот такое (код отформатирован, в оригинале все в одну строку):
``` javascript
// ...
function applyc(__$ctx) {
var __$m…
narqo updated
11 years ago
-
veged updated
11 years ago
-
Right now:
```
$xjst
template(bla) return 'bla'
(function(exports) {
function $e() {
throw new Error;
return;
}
exports.apply = apply;
function apply() {
if (!…
veged updated
11 years ago
-
Я думал вносить `i-bem.bemtree.xjst` из [bem-yana-stub](https://github.com/narqo/bem-yana-stub/) в bem-core, но осознал, что результат вызовава `BEMTREE.applyAsync()` возвращает Vow-промис.
Внимание,…
narqo updated
11 years ago
-
В #310 не портировали добавление `!this.elem` при наличии js-выражения в касотмном предикате:
```
block b-page {
content, !this.ctx._mmm: {
console.log(this.block, this.elem, '++++++++++…
narqo updated
11 years ago
-
Ошибка возникает при геренации html из bemjson'a наложением bemhtml'я
Небольшое расследование на эту тему:
По коду ниже видно, что _apply(this._mode = 'js-params')_ вызывается для dektop'a из шаблона…
-
1. Setup new project from https://github.com/bem/project-stub
2. Add `b-page.bemhtml` width
```
block b-page {
content: {
elem: 'inner',
content: this.ctx.content
}
}
``…
-
After compilation of `template(bla) { url + (page - (1 - start)) + anchor }` all parenthesis are omitted (`url + page - 1 - start + anchor`).
veged updated
11 years ago
-
Template:
```
block b1 {
content: applyNext(this._someFlag = 'blah')
}
```
fails with
```
Error: xjst to js compilation failed:
Error: skipBraces rule failed at: [ [ 'return',
[ 'var',
…
narqo updated
12 years ago