S
S
stanlee2015-06-01 01:25:33
gulp.js
stanlee, 2015-06-01 01:25:33

How to merge libraries correctly?

The project uses several libraries.
In order not to write them all in the header, I decided to combine them all into one file, but after assembly, part of the functionality on the site does not work.
An example of my config

gulp.task('frontend_js', function() {
  return gulp.src([
            'assets/vendor/jquery/dist/jquery.min.js',
            'assets/vendor/flexslider/jquery.flexslider-min.js',
            'assets/vendor/bxslider-4/dist/jquery.bxslider.min.js',
            'assets/vendor/fancybox/source/jquery.fancybox.pack.js',

            'assets/source/js/main.js'

        ])
    .pipe(concat('main.js'))
    .pipe(uglify(uglifyConfig))
    .pipe(gulp.dest('assets/public'))
    .pipe(gzip(gzipConfig))
    .pipe(gulp.dest('assets/public'))
    .pipe(chmod(644))
    .pipe(size({title: 'size'}))
  ;
});

Am I doing something wrong?

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