@bem/sdk.config — library()
const config = require("@bem/sdk.config")();
const mockfs = require('mock-fs');
const { stripIndent } = require('common-tags');
mockfs({
'.bemrc': stripIndent`
module.exports = {
'root': true,
'libs': {
'bem-components': {
'path': 'libs/bem-components'
}
},
}`,
'libs/bem-components': {
'.bemrc': stripIndent`
module.exports = {
'levels': {
'common.blocks': {},
'desktop.blocks': {}
}
}`
}
});
const libConf = await config.library('bem-components').then(lib => {
return lib.get().then(conf => {
return conf;
});
});
libConf;
no comments