-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathgulpfile.js
47 lines (38 loc) · 1.12 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
const gulp = require('gulp')
const concat = require('gulp-concat')
const cssmin = require('gulp-cssmin')
const rename = require('gulp-rename')
const uglify = require('gulp-uglify')
const image = require('gulp-image')
function tarefasCSS(cb) {
return gulp.src('./vendor/**/*.css')
.pipe(concat('libs.css'))
.pipe(cssmin())
.pipe(rename({ suffix: '.min'})) // libs.min.css
.pipe(gulp.dest('./dist/css'))
}
function tarefasJS(){
return gulp.src('./vendor/**/*.js')
.pipe(concat('libs.js'))
.pipe(uglify())
.pipe(rename({ suffix: '.min'})) //libs.min.js
.pipe(gulp.dest('./dist/js'))
}
function tarefasImagem(){
return gulp.src('./src/images/*')
.pipe(image({
pngquant: true,
optipng: false,
zopflipng: true,
jpegRecompress: false,
mozjpeg: true,
gifsicle: true,
svgo: true,
concurrent: 10,
quiet: true
}))
.pipe(gulp.dest('./dist/images'))
}
exports.styles = tarefasCSS
exports.scripts = tarefasJS
exports.images = tarefasImagem