bem-sdk-archive/bem-fs-scheme

Bug in interpreting nested scheme

qfox opened this issue · 0 comments

qfox commented

Atm layer used as an absolute path, it's incorrect.

Layer is an abstract identifier and does not know anything about paths on fs.
In the result fs-scheme can return just relative path to level directory.
So these lines https://github.com/bem-sdk/bem-fs-scheme/blob/master/lib/schemes/nested.js#L50-L52 should looks like:

var folder = path.join(layer + '.blocks', entity.block,
    entity.elem ? (elemDelim + entity.elem) : '',
    entity.mod ? (modDelim + entity.mod.name) : '');

Because layer should contains just 'common' or 'desktop' strings.

p.s. Guess there is the same issue in flat scheme.