enb / enb-bemxjst

bem-xjst support for ENB

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to use includeVow?

apsavin opened this issue · comments

Hi!
I want to specify includeVow: false, because I have vow as ym module. But BEMTREE uses Vow as global variable inside https://github.com/bem/bem-core/blob/v2/common.blocks/i-bem/i-bem.bemtree#L81
So, how can I exclude vow from BEMTREE and provide global Vow variable from my ym module?

That a pity, but it seems that we need to reopen #97. Any other ideas?

@blond?.. Anybody?..

I think we should make a special solution for Vow if includeVow: true.

I will make a Pull Request today.

If includeVow: false.

I will make a Pull Request today.

Sounds great, thanks.

But, to be honest, I'm not a fan of "special solutions" and would prefer more general way like possibility to set a global name (globalName: "Vow", for example).

But, to be honest, I'm not a fan of "special solutions" and would prefer more general way like possibility to set a global name (globalName: "Vow", for example).

I think Vow in BEMTREE is special solutions :) And it is logical to process it in a special way.

ok, how about release 2.0.2?

Thanks!

@tadatuta @blond sorry guys, it doesn't work.

ReferenceError: Vow is not defined

See here
Of course, global.Vow is defined now. But bem-core uses just Vow, not global.Vow. So there is an error. May be, your fix works for browser, but not for node. Even for browser it is a dirty fix, because Vow becomes a global variable (global is window, right?). Global not just for templates, like it always was, but global for all the app. It makes me sad. I don't think it was a good idea to publish such changes.

So what we will do?

I would suggest to return to my proposal about possibility to set a global name for every module. It will be clean and understandable. Users will be able to migrate their old projects without any efforts.

Another option: merge my pr #102 if it looks good for you.