Socket
Socket
Sign inDemoInstall

@bem/fs-scheme

Package Overview
Dependencies
4
Maintainers
6
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @bem/fs-scheme

BEM file system schemes


Version published
Maintainers
6
Install size
353 kB
Created

Readme

Source

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.

ParameterTypeDescriptionDefault
optionsobject, string'"origin"'
options.namingobject, stringDefines delimeters and wordPattern check [@bem/naming]'"origin"'
options.elemDirDelimstringSeparates element's directory"__"
options.modDirDelimstringSeparates 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-

Keywords

FAQs

Last updated on 12 Jun 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc