vkz/bemhtml-syntax

Make converter compatible with bem-xjst 4+

vkz opened this issue · 1 comments

vkz commented

see https://github.yandex-team.ru/lego/islands/pull/509
Compatibility with the latest bem-xjst should be available with relevant flag in the API

  • assert that every template has sub-predicate matching block
  • assert there're no predicates matching this.elem bem/bem-xjst#89
  • assert that every apply sets the mode as its first argument bem/bem-xjst#91
  • warn when apply assigns block, elem, mods, elemMods bem/bem-xjst#73
  • convert def() + applyCtx with this.ctx inside into wrap() see article7 in https://github.yandex-team.ru/lego/islands/pull/509
  • ensure there's always return in def mode. Insert return '' when there is none
  • assert this._buf is never used in templates
vkz commented

apply() checks test:

  block b1 {
    default: { apply({test: 42, elemMods: 'bla'});}
  }