Answer the question
In order to leave comments, you need to log in
Build GULP scripts?
Please tell me what is wrong in the task, at the first execution, all the scripts of the norms are connected, but when watcher
the task is restarted during the work, the index.min.js
scripts are written to the file only from the file script.js
, and all other scripts of the libraries are erased
gulp.task('scripts', function(){
return multipipe(
gulp.src([
'src/assets/libs/jquery/dist/jquery.min.js',
'src/assets/libs/jquery_lazyload/jquery.lazyload.js',
'src/assets/libs/slick-carousel/slick/slick.min.js',
'src/assets/js/script.js'
]),
cached('scripts'),
concat('index.min.js'),
uglify(),
gulp.dest('dist/assets/js') ,
).on('error', notify.onError());
});
Answer the question
In order to leave comments, you need to log in
Try like this:
gulp.task('scripts', function() {
return gulp.src([
'src/assets/libs/jquery/dist/jquery.min.js',
'src/assets/libs/jquery_lazyload/jquery.lazyload.js',
'src/assets/libs/slick-carousel/slick/slick.min.js',
'src/assets/js/script.js'
]).
on('error', notify.onError()).
pipe(cached('scripts')).
pipe(concat('index.min.js')).
pipe(uglify()).
pipe(gulp.dest('dist/assets/js')).
pipe(browserSync.reload({stream: true}));
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question