Answer the question
In order to leave comments, you need to log in
Why in gulp the task launched through watch is not executed correctly?
gulp.task('header', function () {
gulp.src('../sources/js/progress.js')
.pipe(minifyJs())
.pipe(insert.wrap('{literal}', '{/literal}'))
.pipe(rename('progress_min.js'))
.pipe(gulp.dest('../_js'));
});
gulp.task('header_watch', function () {
gulp.watch('../sources/js/progress.js', ['header']);
});
gulp.task('topic_thesaurus_new_less', function () {
var fileName = 'topic_thesaurus_new';
var lessSources = [
'../sources/less/vendor/*.less',
'../sources/less/main.less',
'../sources/less/fonts.less',
'../sources/less/blocks/collapse.less',
'../sources/less/blocks/tooltip.less',
'../sources/less/blocks/range.less',
'../sources/less/blocks/dropdown.less',
'../sources/less/blocks/progress.less',
'../sources/less/blocks/vote.less',
'../sources/less/blocks/settings.less',
'../sources/less/blocks/scroll_pagination.less',
'../sources/less/blocks/suggest.less',
'../sources/less/blocks/mixins.less',
];
return gulp.src(lessSources)
.pipe(concat(fileName + '.less'))
.pipe(less())
.pipe(base64())
.pipe(minifyCss())
.pipe(gzip())
.pipe(gulp.dest('../_css'));
});
gulp.task('topic_thesaurus_new_watch', function () {
var lessSources = [
'../sources/less/vendor/*.less',
'../sources/less/*.less',
'../sources/less/blocks/*.less'
];
gulp.watch(lessSources, ['topic_thesaurus_new_less']);
});
Answer the question
In order to leave comments, you need to log in
Correct "header" in the task
and change all ../ in paths to ./
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question