Make BEM.JSON compatible with BN and bh by delfrrr · Pull Request #153 · bem-node/bem-node · GitHub
Skip to content

Make BEM.JSON compatible with BN and bh#153

Open
delfrrr wants to merge 1 commit into
bem-node:masterfrom
delfrrr:vbilonenko.i-bem__json_bh_yes
Open

Make BEM.JSON compatible with BN and bh#153
delfrrr wants to merge 1 commit into
bem-node:masterfrom
delfrrr:vbilonenko.i-bem__json_bh_yes

Conversation

@delfrrr

@delfrrr delfrrr commented Aug 27, 2014

Copy link
Copy Markdown
Contributor

Now this works well

//outer bem.json
BEM.JSON.decl('mix-use-outer-bem-json-block', {
    onBlock: function (ctx) {
        ctx.content({
            block: 'mix-use-bem-bn-block'
        });
    }
});
//inner bem.json
BEM.JSON.decl('mix-use-inner-bem-json-block', {
    onBlock: function (ctx) {
        ctx.content('inner-content');
    }
});
//inner bn
BN.addDecl('mix-use-bem-bn-block').blockTemplate(function (ctx) {
    ctx.content({
        block: 'mix-use-inner-bem-json-block'
    });
}).done();

@delfrrr

delfrrr commented Aug 27, 2014

Copy link
Copy Markdown
Contributor Author

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не принципиально, но может завернуть в самовызывающююся ф-цию?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

вроде в приве не принципиально

@delfrrr delfrrr force-pushed the vbilonenko.i-bem__json_bh_yes branch from 0ab6580 to c6bf065 Compare January 21, 2015 17:44
@delfrrr delfrrr force-pushed the vbilonenko.i-bem__json_bh_yes branch from c6bf065 to bbef096 Compare January 22, 2015 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants