Closed aledovskikh closed 8 years ago
Here we only build bundles. Normalization is in bem-deps.parse, which called from bem-deps.load method in gulp-bem-src or in development gulp-bem-src.
Maybe we should normalize bem decl with new notation?
I guess we should do it in fs-bundler
or bem-bundle
package.
const declNormalize = data => decl(data).map(e => (e.entity.tech = e.tech, e.entity));
It's a big question what fields we should left in bem-entity
object by default. But it's an off-topic for this module.
Feels like we have found a form:
{entity: {block: String, elem: String, mod: {name: String, val: String}}, tech: String}
but still need a name.
At the moment we want to name it BemCell or BemCytos, but it's another story ;-)
Maybe we should normalize bem decl with new notation?
const decl = require('bem-decl').normalizer('v2');
...
const declNormalize = data => decl(data).map(e => (e.entity.tech = e.tech, e.entity));
bundle.decl = declNormalize(bundle.decl);
...