G
G
Greeg Zagrelov2020-05-12 23:13:31
JavaScript
Greeg Zagrelov, 2020-05-12 23:13:31

Why is Gulp build failing?

Good day to all, I collect js all in one and an error appeared and the code does not work.

5ebb0366ba453669947207.jpeg

gulp.task('script', function() {
    return gulp.src('app/js/*.js')
        .pipe(browserSync.reload({ stream: true }))

});


gulp.task('js', function() {
    return gulp.src([
            'app/js/*.js',
            'node_modules/slick-carousel/slick/slick.js',
            'node_modules/magnific-popup/dist/jquery.magnific-popup.js'
        ])
        .pipe(concat('common.js'))
        // .pipe(uglify())
        .pipe(gulp.dest('app/js'))
        .pipe(browserSync.reload({ stream: true }))
});





gulp.task('watch', function() {
    gulp.watch('app/scss/**/*.scss', gulp.parallel('scss'));
    gulp.watch('app/*.html', gulp.parallel('html'));
    gulp.watch('app/js/*.js', gulp.parallel('script'));
    gulp.watch('app/*.pug', gulp.parallel('pug'));
    gulp.watch('app/dist/images', gulp.parallel('imagemin'));

});


gulp.task('default', gulp.parallel('scss', 'js', 'browser-sync', 'watch'));

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