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

Order of mods #21

Open Yeti-or opened 7 years ago

Yeti-or commented 7 years ago

I think that it's better to put simple mods before mods with values

bemjsonToDecl.convert({
  block: 'popup',
  mods: { theme: ['normal'] }
})

current:

[
    {
        "block": "popup"
    },
    {
        "block": "popup",
        "modName": "theme",
        "modVal": "normal"
    },
    {
        "block": "popup",
        "modName": "theme",
        "modVal": true
    }
]

preferred:

[
    {
        "block": "popup"
    },
    {
        "block": "popup",
        "modName": "theme",
        "modVal": true
    },
    {
        "block": "popup",
        "modName": "theme",
        "modVal": "normal"
    }
]
Yeti-or commented 7 years ago

@zxqfox @tadatuta @blond will you stop me if I change this?

qfox commented 7 years ago

@Yeti-or do it