Created
January 22, 2014 00:30
-
-
Save patrickheeney/8551352 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Command: optimize | |
// | |
gulp.task('optimize', ['imagemin']); | |
// | |
// Command: watch | |
// | |
gulp.task('watch', function () { | |
gulp.watch('gulpfile.js', ['gulpfile']); | |
gulp.watch('assets/scss/{,**/}*.scss', ['compass:dev', 'concat:css']); | |
gulp.watch('assets/javascript/{,**/}*.js', ['concat:js']); | |
}); | |
gulp.task('imagemin', function() { | |
return gulp.src('assets/images/**') | |
.pipe(imagemin({optimizationLevel: 5})) | |
.pipe(gulp.dest('assets/images')); | |
}); | |
// Outputs | |
[gulp] Finished 'imagemin' in 901 ms | |
[gulp] Running 'optimize'... | |
[gulp] Finished 'optimize' in 7.91 μs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment