M
M
Max Zhukov2017-10-07 18:34:54
gulp.js
Max Zhukov, 2017-10-07 18:34:54

How to register in gulp so that my script and css are connected last?

gulp.task('css', function() {
    return gulp.src(sitefolder + '/css/*.css')
        .pipe(concatCss('css/style.min.css'))
        .pipe(csso())
        .pipe(uncss({
            html: [sitefolder + '/index.html']
        }))
        .pipe(gulp.dest(sitefolder + '/minify/'));
});

gulp.task('js', function() {
    return gulp.src([sitefolder + '/js/*.js', sitefolder + '/js/script.js'])
        .pipe(concat('js/script.min.js'))
        .pipe(uglifyjs())
        .pipe(gulp.dest(sitefolder + '/minify/'));
});

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