naming.cell.stringify: stringify using origin convention

node v10.24.1
version: 1.0.1
endpointsharetweet
const bemNaming = require('@bem/sdk.naming.entity'); // This is required, cause RunKit cannot load this package itself. const originNaming = require('@bem/sdk.naming.presets/origin'); const stringify = require('@bem/sdk.naming.cell.stringify')(originNaming); const BemCell = require('@bem/sdk.cell'); var myBemCell; myBemCell = BemCell.create({block: 'my-block', tech: 'css' }); stringify(myBemCell);
myBemCell = BemCell.create({block: 'my-block', tech: 'js' }); stringify(myBemCell);
myBemCell = BemCell.create({block: 'my-block', layer: 'my-layer', tech: 'css' }); stringify(myBemCell);
myBemCell = BemCell.create({block: 'my-block', mod: 'my-modifier', tech: 'css' }); stringify(myBemCell);
myBemCell = BemCell.create({block: 'my-block', mod: 'my-modifier', val: 'some-value', tech: 'css' }); stringify(myBemCell);
myBemCell = BemCell.create({block: 'my-block', elem: 'my-element', tech: 'css' }); stringify(myBemCell);
myBemCell = BemCell.create({block: 'my-block', elem: 'my-element', mod: 'my-modifier', tech: 'css' }); stringify(myBemCell);
Loading…

no comments

    sign in to comment