-
Notifications
You must be signed in to change notification settings - Fork 95
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
Support bem-xjst 8.x in compatible way #1486
Conversation
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.
Вливай, когда тесты позеленеют…
@@ -1 +1,6 @@ | |||
block('ua').js()(true); |
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.
Честно говоря, не представляю кейса, когда нужно отказаться от js:true
в блоке ua
…
@@ -3,6 +3,8 @@ block('page').elem('css')( | |||
tag()('style'), | |||
match(function() { return this.ctx.url; })( | |||
tag()('link'), | |||
attrs()(function() { return { rel : 'stylesheet', href : this.ctx.url }; }) | |||
attrs()(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.
Кстати, не желаешь начать использовать аргументы вместо this
и this.ctx
здесь и в другом месте?
function(node, ctx) {
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.
думаю, это нужно делать одним махом везде, чтобы консистентно было.
var ctxJS = applyNext(); | ||
|
||
if(ctxJS === false) return false; | ||
return ctxJS || true; |
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.
А это не то же самое, что и return applyNext() !== false;
?
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 нет, вот проверочный bemjson: { block: 'ua', js: { test: 1 } }
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.
var res = applyNext(); return res !== false && (res || true);
?
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.
ну окк :-(
Closes #1485