The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Help adding autoprefixer to gulp file

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
  • #239807

    Hi everyone,

    I am trying (struggling) to add autoprefixer to my gulp file.

    My current set up is:

    • look for sass file changes
    • convert to css
    • minify css
    • refresh browser with browser sync

    Obviously I’d like to add autoprefixer before the css file is minified. I had some luck adding it in but it didn’t actually change the css file and no errors appeared.

    Here is my working gulp file.

    // Include gulp
    var gulp = require('gulp');
    // Include Our Plugins
    var sass = require('gulp-sass');
    var uglify = require('gulp-uglify');
    var uglifycss = require('gulp-uglifycss');
    var browsersync = require('browser-sync');
    // Compile Our Sass
    gulp.task('sass', function() {
        return gulp.src('lib/themes/domain/styles/*.scss')
    gulp.task('uglify', function () {
          "max-line-len": 80
    var browserSync = require('browser-sync').create();
    var urlPath = "";
    gulp.task('browser-sync', function (cb) {
            proxy: urlPath,
        }, function() {
  'lib/themes/domain/<em>.php').on("change", browserSync.reload);
  'lib/themes/domain/styles/</em>/<em>.scss', ['sass']).on("change", browserSync.reload);
  'lib/themes/domain/styles/</em>.scss', ['sass']).on('change', browserSync.reload);
  'lib/themes/domain/style.css').on('change', function () {
    gulp.task('default', ['browser-sync']);

    If someone can help me here that would be great. It’s working perfectly but not autoprefixer.

    Please don’t just send me to a link to copy some code as I’ve tried that with no luck and without completely rewriting my gulp file.


Viewing 1 post (of 1 total)
  • The forum ‘Other’ is closed to new topics and replies.