-
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
README: Add naming field to example #286
base: master
Are you sure you want to change the base?
Conversation
@@ -149,7 +149,8 @@ console.log(configs); // all found configs from all dirs | |||
"levels": [ | |||
{ | |||
"path": "path/to/level", | |||
"scheme": "nested" | |||
"scheme": "nested", | |||
"naming": "react" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can I define scheme
and naming
on the top near the root
-prop? Simple example "I want to define react-naming to all my levels"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You promised to write them on the top here ))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, i misunderstood your idea.
let's doublecheck it again.
for following file structure:
parent-dir/
.bemrc # root: true here
project-cwd/
.bemrc
and
// parent-dir/.bemrc
{
"root": true,
"levels": [
{
"path": "path/to/level",
"scheme": "nested",
"naming": "react"
}
]
}
// parent-dir/project-cwd/.bemrc
{
"levels": [
{
"path": "path/to/level",
"scheme": "nested"
}
]
}
run
require('@bem/sdk.config')().levelSync('path/to/level'); // { scheme: 'nested', naming: 'react' }
isn't it exactly what you need?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mmm. levelSync takes path
not layer
. My bad, sorry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will you add naming/scheme
props on the top level of config like:
{
"root": true,
"naming": "react",
"levels": ...
}
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works as you wish right now (any option from root level will be available in levelSync()
output). The reason I don't want it in example in readme is that each level can actually have its own naming scheme.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand but specifying naming
on top is very common. So I propose to add it in example
@tadatuta lets finish this :) |
No description provided.