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
Did you know?
JavaScript on a page runs with the privileges of that origin. One altered library, tag manager, or snippet can read inputs, change what people see, and call your APIs as the user.
Security insights from Cside
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#