Answer the question
In order to leave comments, you need to log in
Why does the gulp plugin not work correctly when called by watch?
I'm not sure if this is specific to a plugin or gulp in general. In general, I use gulp-bem .
I hung spying on the necessary files:
gulp.task('watch', ['build'], function() {
return watch([
'blocks/**/*.styl',
'blocks/**/*.js',
'blocks/**/*.deps.js'
], function () {
return gulp.start('build');
});
});
var bem, deps, levels = [
'blocks/common',
'blocks/desktop',
'bundles'
];
gulp.task('deps', function (done) {
delete require.cache[require.resolve('gulp-bem')];
bem = require('gulp-bem');
deps = bem(levels, {
elem: '__',
mod: '--'
}).deps('bundles/profile');
return done();
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question