bem-sdk-archive / bemjson-to-decl

BEMJSON to BEMDECL converter. DEPRECATED →
https://github.com/bem/bem-sdk/tree/master/packages/bemjson-to-decl
Other
2 stars 2 forks source link

block_mod from nowhere #22

Open Yeti-or opened 7 years ago

Yeti-or commented 7 years ago

https://runkit.com/581a9fba871f320014cdcdf7/58ae28aaef3db200148290ed

var bemjsonToDecl = require("bemjson-to-decl");

var bemJson =
({ 
    block: 'popup',
    content: [
        {
            mods: { custom: 'd' },
            tag: 'dd'
        }
    ]
});

JSON.stringify(bemjsonToDecl.convert(bemJson), null, 4);
[
    {
        "block": "popup"
    },
    {
        "block": "popup",
        "modName": "theme",
        "modVal": "normal"
    },
    {
        "block": "popup",
        "modName": "theme",
        "modVal": true
    }
]
qfox commented 7 years ago

I'd say there is a bug because block_mod should be before block_mod_val. But it's right that we have it.

Yeti-or commented 7 years ago

@zxqfox https://goo.gl/AplJxL