-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add method to extract level configuration from path #277
Comments
cc @tadatuta We need your expertise |
You are right,
Actually it's not parent config but the merge of all the declarations for the level from all the configs (almost like There's possibility to work with raw data with config method but for sure it's not convenient. |
Yes but except fields defined in // .bemrc
{
prop1: 'foo',
levels: [{ layer: 'bar', prop2: 'baz' }]
}
// code
const BemConf = require('@bem/sdk.config');
const config = new BemConf();
config.getLevelSync('bar');
// returns { prop1: 'foo' } <---- where is my prop2 ? Issue is about two things:
|
the issue here is that so it your example what we need is to support both path (as fallback) and layer as arguments for |
Agree 👍 Here is noted that |
Wait, what you mean about |
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:
There is no
method
to get options for specific layer. My suggestions:.bemrc
+ add fix to readmeThe text was updated successfully, but these errors were encountered: