bem-sdk-archive / meta

Meta project for BEM SDK modules
6 stars 0 forks source link

bem-cell package #15

Open blond opened 7 years ago

blond commented 7 years ago

Representation of identifier of a part of BEM entity.

Class should have fields:

Field Type Required
entity bem-entity-name required
tech string optionaly
layer string optionaly

Possible API:

const cell = require('@bem/cell');

const cell = new BemCell({
    entity: { block: 'button', elem: 'text' },
    tech: 'css',
    layer: 'common'
});

cell.entity // // ➜ BemEntityName { block: 'button', elem: 'text' }
cell.tech // css
cell.layer // common
cell.id // button__test@common.css
cell.contains(cell2) // true|false
qfox commented 7 years ago

@blond Any progress here?