New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BEMHTML: Support nested mixes #280
Conversation
lib/bemhtml/index.js
Outdated
out += nested.out; | ||
} | ||
|
||
// Process nested mixes from Templates |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function grows so much. I'm afraid it refused to be optimized in v8.
|
5a89d99
to
e1a3904
Compare
Updated |
49ea8e1
to
c938dab
Compare
mix: { | ||
block: 'b3', | ||
mods: { test: 'opa' }, | ||
js: { data: '123' }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А почему нет этих параметров в эталоне?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zxqfox это ошибка, надо добавлять. Сейчас поправлю. Спасибо, что нашел!
c938dab
to
7fad99b
Compare
test/bemjson-mix-test.js
Outdated
@@ -238,4 +238,48 @@ describe('BEMJSON mix', function() { | |||
'b__e_modname_modval"></div></div>'); | |||
}); | |||
}); | |||
|
|||
describe('should support nested mixes', function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
describe('nested mixes', function() {
it('should support nested mix', function() {
it('should support nested mix with js params', function() {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tadatuta fixed!
7fad99b
to
d3d49d4
Compare
2df3a84
to
9cd0e27
Compare
Removed commit about #147 bacause I try to implement apply all modes from nested mix. As long as it can benchmark penalty I decided to move it in another PR. |
Description updated. |
6f5e614
to
20b8a29
Compare
29233cf
to
788c06c
Compare
|
addInit: addJSInitClass | ||
}, | ||
null, | ||
this.classBuilder); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this.classBuilder
не нужен
} | ||
} | ||
}, | ||
'<div class="b1 b2__e b3 b3_test_opa b4 b5"></div>'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need test with templates on mixes
Fix #241
This PR about only support in mix something like this: