bem-cell package
Opened this issue · 1 comments
blond commented
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
- Code
- Basic object with assertions (bem-sdk-archive/bem-cell#1)
- Add dynamic field
id
(bem-sdk-archive/bem-cell#2) - Improve debugability (bem-sdk-archive/bem-cell#3)
- Add method
contains(...)
etc
- Docs
- Describe API (bem-sdk-archive/bem-cell#4)
- Write purpose of the module (bem-sdk-archive/bem-cell#5)
- Tests
- That's all folks!