Answer the question
In order to leave comments, you need to log in
How to include JS plugins in gulpfile.js?
Good evening!
Tell me how to include plugins in gulpfile.js.
This is how the code looks like, for some reason only jQuery appeared.
All paths are correct, I can not understand what the problem is!
gulp.task('lib', function () {
return gulp.src([
'node_modules/jquery/dist/jquery.js',
'node_modules/slick-carousel/slick/slick.min.js',
'node_modules/masonry-layout/dist/masonry.pkgd.min.js',
])
.pipe(concat('lib.js'))
.pipe(uglify({
toplevel: true
}))
.pipe(rename({ suffix: '.min' }))
.pipe(gulp.dest('./build/js'))
.pipe(browserSync.reload({ stream: true }))
});
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