Conversation
|
@awinogradov @Yeti-or check my PR please |
d125b31 to
9606494
Compare
|
сс @tadatuta |
|
I think |
|
|
|
@tadatuta reasonably noted that all we need is to declare a custom preset for "bem-react-components" like: // based on react preset
module.exports = {
delims: {
elem: '-',
mod: { name: '_', val: '_' }
},
fs: {
delims: { elem: '' },
pattern: 'blocks/${entity}.${tech}',
scheme: 'nested'
},
wordPattern: '[a-zA-Z0-9]+'
};But "bem-react-components" should be simple and such complex thing like full naming form is too much. May be we can give an option to define naming preset based on one of standard presets. This is much simpler: module.exports = {
basedOn: 'react',
fs: { patter: 'blocks/${entity}.${tech}' }
}; |
|
Actually, you can do this without const { react } = '@bem/sdk.naming.presets';
module.exports = { ...react, fs: { ...react.fs, pattern: '${entity}.${tech}' } };And path to library (or to btw. Do you want to join us at this weekend to dive into webpack world? |
|
|
|
тогда уж |
Needed to build it with webpack-bem-plugin.
Why?
bemrc(used by bem-sdk) should define level in a form{ layer: 'foo' }for folder "foo.blocks". Defining level with path property is deprecatedThere is no simple way to handle "bem-react-components" with custom folder "blocks" and build projects by webpack-bem-plugin or other builder using bem-sdk.
I've created an issue about it and found no other way. May be after this issue we can get better decision. For now is better to use simple approach: "If bem-react-components defines common blocks we put them in so called folder"