Last Updated: February 25, 2016
·
1.335K
· neb636

Gulp.js vs. Grunt.js - Code vs Configuration

Registering SASS and Autoprefixer

Gulp

    gulp.task('styles', function() {
        gulp.src('sass/styles.scss')
            .pipe(sass())
            .pipe(autoprefixer('last 1 version', '> 1%', 'ie 8', 'ie 7'))
            .pipe(gulp.dest('css'));
});

Grunt

sass: {
    dist: {
        files: {
            'sass/styles.scss': 'css/styles.css'
        }
    }
},

autoprefixer: {
    single_file: {
        options: {
            browsers: ['last 2 version', 'ie 8', 'ie 9']
        },
        src: 'css/styles.css',
        dest: 'css/styles.css'
    },
},

Read more about the differences at
Gulp VS. Grunt: Node.js Automation Tools Showdown