forked from cameronwp/udportfolio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGulpfile.js
31 lines (26 loc) · 805 Bytes
/
Gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
var gulp = require('gulp');
var uglify = require('gulp-uglify');
var minifyCss = require('gulp-minify-css');
var imagemin = require('gulp-imagemin');
var pngquant = require('imagemin-pngquant');
gulp.task('minify-js', function() {
return gulp.src('js/*.js')
.pipe(uglify())
.pipe(gulp.dest('dist'));
});
gulp.task('minify-css', function() {
return gulp.src('css/*.css')
.pipe(minifyCss({compatibility: 'ie8'}))
.pipe(gulp.dest('dist'));
});
gulp.task('minify-img', function () {
return gulp.src('img/*')
.pipe(imagemin({
progressive: true,
svgoPlugins: [{removeViewBox: false}],
use: [pngquant()]
}))
.pipe(gulp.dest('dist/images'));
});
// Default Task
gulp.task('default', ['lint', 'sass', 'scripts', 'watch']);