bem-sdk-archive / bemjson-node

:leaf: Woof. DEPRECATED →
https://github.com/bem/bem-sdk/tree/master/packages/bemjson-node
Other
0 stars 0 forks source link

Initial impl #1

Closed qfox closed 7 years ago

qfox commented 7 years ago
BemjsonMods = Map<String, String> // just interface
BemjsonNode = {
  block: String,
  elem: ?String,
  mods: ?BemjsonMods,
  elemMods: ?BemjsonMods,
  mix: ?Array<BemjsonNode>
};
new BemjsonNode({
    block: 'block',
    elem: 'e',
    mix: ['qwe', {block: 'e', elem: 'q'}]
});
// → BemjsonNode<{
    block: 'block',
    elem: 'e',
    mix: [
        BemjsonNode<{block: 'qwe'}>,
        BemjsonNode<{block: 'e', elem: 'q'}>
    ]
}>

Warn if there is no block field, or if there elemMods using without elem, etc.

qfox commented 7 years ago

Closed by https://github.com/bem-sdk/bemjson-node/commit/652c881fe72362a572a14ac64ce10e861468f9eb