This version is not covered by your current version range.
Without accepting this pull request your project will work just like it did before. There might be a bunch of new features, fixes and perf improvements that the maintainers worked on for you though.
I recommend you look into these changes and try to get onto the latest version of bem-xjst.
Given that you have a decent test suite, a passing build is a strong indicator that you can take advantage of these changes by merging the proposed change into your project. Otherwise this branch is a great starting point for you to work on the update.
Do you have any ideas how I could improve these pull requests? Did I report anything you think isn’t right?
Are you unsure about how things are supposed to work?
There is a collection of frequently asked questions and while I’m just a bot, there is a group of people who are happy to teach me new things. Let them know.
1. Support mod() and elemMod() without second argument
/** * @param{String}modName name of the block modifier * @param{String|Boolean}[modVal] value of the block modifier */mod(modName, modVal)
If second argument of mod() was omited then templates with any
non-empty value of modifier will be applied.
block('a').mod('size').tag()('span');
Template will be applied to BEMJSON node if block equals to 'a' and
'size' modifier exists (equals neither to undefined nor to '' nor to false
nor to null).
Now with such templates or such BEMJSON you will get warnings:
BEM-XJST WARNING: looks like you’re trying to set HTMLclassfrom attrs field inBEMJSON. Please use cls() mode forit. See documentation: https://github.com/bem/bem-xjst/blob/master/docs/en/5-templates-syntax.md#cls
ctx: {"block":"class-attr-tmpl"}
attrs: {"class":"wrong"}
BEM-XJST WARNING: looks like you’re trying to set data-bem attribute from attrs field inBEMJSON. Please use js() mode forit. See documentation: https://github.com/bem/bem-xjst/blob/master/docs/en/5-templates-syntax.md#js
ctx: {"block":"databem-attr-bemjson","attrs":{"data-bem":{"block":"a","js":true}}}
attrs: {"data-bem":{"block":"a","js":true}}
BEM-XJST WARNING: looks like you’re trying to set data-bem attribute from attrs field inBEMJSON. Please use js() mode forit. See documentation: https://github.com/bem/bem-xjst/blob/master/docs/en/5-templates-syntax.md#js
ctx: {"block":"databem-attr-bemjson","attrs":{"data-bem":{"block":"a","js":true}}}
attrs: {"data-bem":{"block":"a","js":true}}
BEM-XJST WARNING: looks like you’re trying to set data-bem attribute from attrs field inBEMJSON. Please use js() mode forit. See documentation: https://github.com/bem/bem-xjst/blob/master/docs/en/5-templates-syntax.md#js
ctx: {"block":"databem-attr-tmpl"}
attrs: {"data-bem":"wrong"}
Commits:
[61e555bddf] - Merge pull request #346 from bem/issue-274__mods-wildcard (Slava Oliyanchuk)
[6a9625d0b9] - Merge pull request #349 from bem/issue-212__attrs-runtime-lint (Slava Oliyanchuk)
[53dbfef63d] - Merge pull request #347 from bem/del-mod (Slava Oliyanchuk)
[5f5221f603] - Fixed #274: Support mod(m) and elemMod(em) without second argument (miripiruni)
[9aacd9105b] - Runtime lint: Warning about class or data-bem in attrs (miripiruni)
The new version differs by 73 commits (ahead by 73, behind by 8).
Hello lovely humans,
bem-xjst just published its new version 7.3.0.
This version is not covered by your current version range.
Without accepting this pull request your project will work just like it did before. There might be a bunch of new features, fixes and perf improvements that the maintainers worked on for you though.
I recommend you look into these changes and try to get onto the latest version of bem-xjst. Given that you have a decent test suite, a passing build is a strong indicator that you can take advantage of these changes by merging the proposed change into your project. Otherwise this branch is a great starting point for you to work on the update.
Do you have any ideas how I could improve these pull requests? Did I report anything you think isn’t right? Are you unsure about how things are supposed to work?
There is a collection of frequently asked questions and while I’m just a bot, there is a group of people who are happy to teach me new things. Let them know.
Good luck with your project :sparkles:
You rock!
:palm_tree:
GitHub Release
2016-09-21 v7.3.0, @miripiruni
1. Support
mod()
andelemMod()
without second argumentIf second argument of
mod()
was omited then templates with anynon-empty value of modifier will be applied.
Template will be applied to BEMJSON node if block equals to 'a' and
'size' modifier exists (equals neither to
undefined
nor to''
nor tofalse
nor to
null
).But templates will not be applied to entities:
The same for
elemMod()
mode.2. Runtime lint warning for class and data-bem attributes in attrs field in BEMJSON or
attrs()
template result.BEMJSON:
Templates:
Now with such templates or such BEMJSON you will get warnings:
Commits:
61e555bddf
] - Merge pull request #346 from bem/issue-274__mods-wildcard (Slava Oliyanchuk)6a9625d0b9
] - Merge pull request #349 from bem/issue-212__attrs-runtime-lint (Slava Oliyanchuk)53dbfef63d
] - Merge pull request #347 from bem/del-mod (Slava Oliyanchuk)5f5221f603
] - Fixed #274: Supportmod(m)
andelemMod(em)
without second argument (miripiruni)9aacd9105b
] - Runtime lint: Warning about class or data-bem inattrs
(miripiruni)The new version differs by 73 commits (ahead by 73, behind by 8).
675e7e9
7.3.0
dbbd4aa
update AUTHORS
f9d6cd4
changelog updated
6ade6c1
Docs: second argument of mod() or elemMod() is optional
61e555b
Merge pull request #346 from bem/issue-274__mods-wildcard
6a9625d
Merge pull request #349 from bem/issue-212__attrs-runtime-lint
53dbfef
Merge pull request #347 from bem/del-mod
5f5221f
Fixed #274: Support
mod(m)
andelemMod(em)
without second argument9aacd91
Runtime lint: Warning about class or data-bem in
attrs
b2f14b7
7.2.0
1af90f5
update AUTHORS
6a798fb
changelog updated
623cb59
Merge pull request #342 from bem/runtime-assertions
0e0486a
Runtime lint
1e4e0d7
BEMHTML: mod removed as useless
There are 73 commits in total. See the full diff.
This pull request was created by greenkeeper.io.
Tired of seeing this sponsor message? :zap:
greenkeeper upgrade