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
assignsblock
,elem
,mods
,elemMods
bem/bem-xjst#73 - convert
def()
+applyCtx
withthis.ctx
inside intowrap()
see article7 in https://github.yandex-team.ru/lego/islands/pull/509 - ensure there's always
return
indef
mode. Insertreturn ''
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'});}
}