EN
Forum

Methodology

Toolbox

Platform

naming.cell.stringify

BEM file system schemes.

Supported presets

Naming conventions

BEM naming convention.

Schemes

Usage

const BemCell = require('@bem/sdk.cell');

const cell = BemCell.create({
    block: 'b1',
    elem: 'e1',
    mod: {name: 'm1', val: 'v1'},
    tech: 'js'
});

const stringify = require('@bem/sdk.naming.cell.stringify')('origin')

stringify(cell); // b1/__e1/_m1/b1__e1_m1_v1.js

Options

dirNaming has meaning only for nested scheme.

ParameterTypeDescriptionDefaultoptionsobject, string'"origin"'options.namingobject, stringDefines delimeters and wordPattern check '"origin"'options.elemDirDelimstringSeparates element's directory"__"options.modDirDelimstringSeparates mod's directory"_"

Options could be one of these strings:

check ./lib/presets

License

Code and documentation © 2015-2017 YANDEX LLC. Code released under the Mozilla Public License 2.0.

: https://github.com/bem/bem-sdk/tree/master/packages/naming#bemnaming-elem-mod-wordpattern-

Оцените статью
Report an error on GitHub or correct using prose.io.