S
S
Sergey Kondrashevsky2019-11-14 16:37:54
JavaScript
Sergey Kondrashevsky, 2019-11-14 16:37:54

How to connect jQuery and plugins via gulp-rigger?

Hello!
I'm trying to include plugins with node_modules in the lib.js folder using gulp-rigger, but nothing happens.

This is how I connect to lib.js
//= ../../node_modules/jquery/dist/jquery.js

and here is an example code from gulpfile.js

gulp.task('js', function () {
  return gulp.src('src/js/**/*.js')
    .pipe(plumber())
    .pipe(rigger())
    .pipe(sourcemaps.init())
    .pipe(uglify())
    .pipe(sourcemaps.write())
    .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

1 answer(s)
V
Vyach Gor, 2019-11-14
@sharnirio

Most likely an error in the connection path, but otherwise this is not the best way to include libraries in the project. Why do you not like storing jquery.js in the main folder with js? And you can also connect gulp-rigger to the main js file if you want to compile everything into one file.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question