S
S
Sergey Kondrashevsky2019-11-09 18:23:09
JavaScript
Sergey Kondrashevsky, 2019-11-09 18:23:09

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 }))
});

I will be grateful for your help!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question