hlpktq
Last Updated: February 25, 2016
·
949
· neb636
Acc5dd4b6fd3fb9086148ad1b8b4e428

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

Say Thanks
Respond