floatdrop / gulp-bem

BEM toolset for gulp
26 stars 2 forks source link

Misunderstanding #16

Closed 1999 closed 8 years ago

1999 commented 8 years ago
  1. https://github.com/floatdrop/gulp-bem#bemlevels-options link to deps function is broken (leads to 404)
  2. API question.
var levels = [
        'bower_components/bem-core/common.blocks',
        'bower_components/bem-core/desktop.blocks',
        'ymodules',
        'blocks/common'
    ];

    var bem = require('gulp-bem');
    var concat = require('gulp-concat');

    var tree = bem(levels);

    tree.deps('app/pages/common')
        .pipe(bem.src('*.scss'))
        .pipe(concat('sample.scss'))
        .pipe(gulp.dest('./'));

FOA whys is this code not outputting anything? sample.scss has not been created and no error is displayed. Then, what is deps function used for? Is this something like a path to bemdecl/bemjson file with all blocks used inside web page? Can I just set asterisk to say "I want all blocks from levels"?

floatdrop commented 8 years ago

I don't think we tested gulp-bem against bem-core. May be something wrong with deps resolution.

1999 commented 8 years ago

What have you tested it against then? And what about my second question?

Then, what is deps function used for? Is this something like a path to bemdecl/bemjson file with all blocks used inside web page? Can I just set asterisk to say "I want all blocks from levels"?

floatdrop commented 8 years ago

deps function - Gets all dependencies for block. Returns dependencies in order, that defined by require and expect of corresponding BEM objects and levels of declaration.

We tested it on getbem site, when it was built with deps. Now we migrated on webpack and recommend you to do the same.

I don't think gulp-bem will be developed further.

1999 commented 8 years ago

That's quiet hard for us right now :) Anyway thank you!

floatdrop commented 8 years ago

@1999 I heard, that they released self-contained JS and CSS files with all styles and code, so you can try use them and any build system you want ;)

1999 commented 8 years ago

I'm not talking about bem-components this time. Мы не используем Лего.