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
Written by Nick
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Node
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#