We have i-bem.vanilla.js that provides DOM-independent BEM framework.
Since we have the modular system, we don't need to use the i-bem module for creating BEM-entities without DOM representation. All common helpers can be defined as simple ym-modules. We never use clear i-bem module in client-side code, only it's DOM-specific redefinition.
We use the *.js extension for files with DOM-specific JavaScript.
So there is no need to create a separate entity. We just should redefine i-bem.vanilla.js by i-bem.js.
We won't lose an ability to use i-bem module in any environment without DOM - just build *.vanilla.js files without *.js.
This approach is more clear from any POV. If we do so, we don't more need to clarify why the framework's name is i-bem, but i-bem-dom module is used everywhere.
As for the file extensions, then we should gradually go towards a world where *.js will replace *.vanilla.js and all that we now write in *.js/*.browser.js should be moved to *.dom.js. If some day we'll find ourselves at that point, we'll get still more clear pattern: i-bem.js is common BEM-framework and i-bem.dom.js is for the DOM-specific things.
From discussions on working meetings with @veged @dfilatov @narqo.
We have
i-bem.vanilla.js
that provides DOM-independent BEM framework.Since we have the modular system, we don't need to use the
i-bem
module for creating BEM-entities without DOM representation. All common helpers can be defined as simpleym
-modules. We never use cleari-bem
module in client-side code, only it's DOM-specific redefinition.We use the
*.js
extension for files with DOM-specific JavaScript.So there is no need to create a separate entity. We just should redefine
i-bem.vanilla.js
byi-bem.js
. We won't lose an ability to usei-bem
module in any environment without DOM - just build*.vanilla.js
files without*.js
.This approach is more clear from any POV. If we do so, we don't more need to clarify why the framework's name is
i-bem
, buti-bem-dom
module is used everywhere.As for the file extensions, then we should gradually go towards a world where
*.js
will replace*.vanilla.js
and all that we now write in*.js
/*.browser.js
should be moved to*.dom.js
. If some day we'll find ourselves at that point, we'll get still more clear pattern:i-bem.js
is common BEM-framework andi-bem.dom.js
is for the DOM-specific things.From discussions on working meetings with @veged @dfilatov @narqo.