BEM file system schemes. DEPRECATED →
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
test
.eslintrc
.gitignore
.travis.yml
LICENSE.txt
README.md
index.js
package-lock.json
package.json

README.md

bem-fs-scheme

BEM file system schemes.

Supported schemes

Usage

var BemCell = require('@bem/cell'),
    BemEntityName = require('@bem/entity-name');

var atom = new BemCell(
    {
        entity: new BemEntityName({
            block: 'b1',
            elem: 'e1',
            mod: {name: 'm1', val: 'v1'}
        }),
        tech: 'js'
    }
);

var options = {
    naming: 'origin'
};

var bemFs = require('bem-fs-scheme')('nested')

bemFs.path(atom, options); // b1/__e1/_m1/b1__e1_m1_v1.js

Options

elemDirDelim and modDirDelim has meaning only for nested scheme.

Parameter Type Description Default
options object, string '"origin"'
options.naming object, string Defines delimeters and wordPattern check [@bem/naming] '"origin"'
options.elemDirDelim string Separates element's directory "__"
options.modDirDelim string Separates mod's directory "_"

Options could be one of these strings:

  • "origin"
  • "two-dashes"
  • "react"

check ./lib/presets

License

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

[@bem/naming] : https://github.com/bem-sdk/bem-naming#bemnaming-elem-mod-wordpattern-