Skip to content

Add method to extract level configuration from path #277

@Vittly

Description

@Vittly

In webpack-bem-plugin I want to get preset from path to specific file in project.

Firstly I thought that levelSync solves my problem. But It returns "nearest parent config".

Then I read Readme. This part:

"levels": [
    {
        "path": "path/to/level",
        "scheme": "nested" // < --- Look here. May be "preset" or "naming" should be there
    }
],

There is no method to get options for specific layer. My suggestions:

  • add method to return level declaration by path to file
  • add method to return level declaration by level (if naming.file.parse return level from path)
  • tell me that "preset" or "naming" is project level option and put it in the root of .bemrc + add fix to readme

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions