gulp-bem / gulp-bem-bundle-builder

DEPRECATED repository, moved to https://github.com/bem/gulp-bem/tree/master/packages/gulp-bem-bundle-builder
Other
3 stars 1 forks source link

bemdecl из gulpfile #12

Open belozer opened 7 years ago

belozer commented 7 years ago

Как можно задать сборщику bem-decl из gulpfile? Как это сделано здесь https://github.com/gulp-bem/gulp-bem-src

Нужно, чтобы проект держать более чистым (без лишних файлов на fs).

qfox commented 7 years ago
const intoStream = require('into-stream');
const BemBundle = require('@bem/bundle');

intoStream(new BemBundle({
  name: '',
  path: '',
  decl: [
    {entity: {block: 'b1'}},
    {entity: {block: 'b2'}},
  ]
})).pipe(...)

https://github.com/bem-sdk/bem-bundle/blob/master/lib/index.js#L11