naming.file.stringify: using origin convention
const bemNaming = require('@bem/sdk.naming.entity'); // This is required, cause RunKit cannot load this package itself.
const originNaming = require('@bem/sdk.naming.presets/origin');
const stringify = require('@bem/sdk.naming.file.stringify')(originNaming);
const BemFile = require('@bem/sdk.file');
var myFile;
myFile = BemFile.create({block: 'my-block', tech: 'css' });
stringify(myFile);
myFile = BemFile.create({block: 'my-block',
tech: 'js',
level: 'bem-files'});
stringify(myFile);
myFile = BemFile.create({block: 'my-block',
tech: 'css',
layer: 'desktop',
level: 'bem-files'});
stringify(myFile);
myFile = BemFile.create({block: 'my-block',
tech: 'css',
level: 'my-project/bem-files'});
stringify(myFile);
myFile = BemFile.create({block: 'my-block',
mod: 'my-modifier',
val: 'some-value',
tech: 'css',
level: 'bem-files'});
stringify(myFile);
myFile = BemFile.create({block: 'my-block',
elem: 'my-element',
mod: 'my-modifier',
tech: 'css',
level: 'bem-files' });
stringify(myFile);
no comments