-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile
More file actions
36 lines (33 loc) · 731 Bytes
/
gulpfile
File metadata and controls
36 lines (33 loc) · 731 Bytes
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
const { src, dest, parallel } = require('gulp');
const minifyCSS = require('gulp-csso');
const concat = require('gulp-concat');
const rename = require("gulp-rename");
function html() {
return src('gulpsrc.html')
.pipe(rename('index.html'))
.pipe(dest('build'))
}
function svg(){
return src('*.svg')
.pipe(dest('build'))
}
function css() {
return src('*.css')
.pipe(minifyCSS())
.pipe(dest('build'))
}
function js() {
return src('*.js')
.pipe(concat('main.js'))
.pipe(dest('build'))
}
function cop() {
return src('sw.js')
.pipe(dest('build'))
}
exports.svg = svg;
exports.cop = cop;
exports.js = js;
exports.css = css;
exports.html = html;
exports.default = parallel(html, css, js, svg);