Last active
September 21, 2015 21:06
-
-
Save dleitee/3747a215fe3d347de826 to your computer and use it in GitHub Desktop.
gulp with es6
This file contains 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
import gulp from 'gulp'; | |
import stylus from 'gulp-stylus'; | |
import uglify from 'gulp-uglify'; | |
import imagemin from 'gulp-imagemin'; | |
gulp.task('css', () => { | |
return gulp.src('./src/css/*.styl') | |
.pipe(stylus({ | |
compress: true | |
})) | |
.pipe(gulp.dest('./build/css')); | |
}); | |
gulp.task('js', () => { | |
return gulp.src('./src/js/*.js') | |
.pipe(uglify()) | |
.pipe(gulp.dest('./build/js')); | |
}); | |
gulp.task('img', () => { | |
return gulp.src('./src/img/*') | |
.pipe(imagemin({ | |
progressive: true, | |
svgoPlugins: [{removeViewBox: false}], | |
})) | |
.pipe(gulp.dest('./build/img')); | |
}); | |
gulp.task('default', ['css', 'js', 'img'], () => {} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment