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

Rework public API, clean up purpose of the module #17

Open qfox opened 7 years ago

qfox commented 7 years ago

@tadatuta said this module should ~store~ stringify entities since it's called bemjson2decl and decl is a file ...bemdecl.js (we've made an issue for that: #13)

I'm see we need to make public API clear, write docs and work on consistency between bem-sdk modules.

What we have:

What I expect:

Something ilke:

module.exports = bemjsonToDecl;

bemjsonToDecl.convert = bemjsonToDecl; // To not make back-incomp changes
bemjsonToDecl.stringify = (bemjson, opts) => bemDecl.stringify(bemjsonToDecl(bemjson), opts);

function bemjsonToDecl(bemjson) {
    ...
}
Yeti-or commented 7 years ago

like 👍