bem / bem-sdk

BEM SDK packages
https://en.bem.info/toolbox/sdk/
88 stars 25 forks source link

How can/should i use bemjson-to-decl package? #205

Closed shkarupa-alex closed 7 years ago

shkarupa-alex commented 7 years ago

Old package https://github.com/bem-sdk-archive/bemjson-to-decl now forwards to https://github.com/bem/bem-sdk/tree/master/packages/bemjson-to-decl

But how to install it? Name in package.json already changed, but not published.

There some questions with it:

  1. What package should i prefer: old or new?
  2. If new, how to install it?
  3. If i want to make pull request, what package should i use: old or new?
qfox commented 7 years ago

We had some troubles with publishing the latest version of bemjson-to-decl package, so if you need the solution right now please use the old version.

  1. Old version for now.
  2. It's impossible right now, new version will be available as @bem/sdk.bemjson-to-decl (or something similar) package.
  3. The new one.

We gonna solve trouble with publishing today, prob we're lucky and will finish it.

qfox commented 7 years ago
$ npm i @bem/sdk.bemjson-to-decl
+ @bem/sdk.bemjson-to-decl@0.2.1
$ node -p 'require("@bem/sdk.bemjson-to-decl").convert({block: "b", mods: {width: "auto"}})'
[ BemEntityName { block: 'b' },
  BemEntityName { block: 'b', mod: { name: 'width', val: true } },
  BemEntityName { block: 'b', mod: { name: 'width', val: 'auto' } } ]