forked from bytize/talking-virtual-avatar-chatbot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
56 lines (51 loc) · 1.31 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
48
49
50
51
52
53
54
55
56
const { src, dest, series, parallel } = require('gulp');
var concat = require('gulp-concat');
var minify = require('gulp-minify');
var cleanCss = require('gulp-clean-css');
var rev = require('gulp-rev');
var del = require('del');
const clearJs = function () {
return del([
'public/dist/js/*.js'
]);
};
const clearCss = function () {
return del([
'public/dist/css/*.css'
]);
};
const packJs = function () {
return src(['public/js/jquery.min.js',
'public/js/annyang.min.js',
'public/js/bootstrap.min.js',
'public/js/prelodr.min.js',
'public/js/VideoFrame.js',
'public/js/soundmanager.js',
'public/js/siriwave.js',
'public/js/script.js'])
.pipe(concat('bundle.js'))
.pipe(minify({
ext:{
min:'.js'
},
noSource: true
}))
.pipe(rev())
.pipe(dest('public/dist/js'))
.pipe(rev.manifest('public/dist/manifest.json', {
merge: true
}));
};
const packCss = function () {
return src(['public/css/bootstrap.css',
'public/css/prelodr.min.css',
'public/css/style.css'])
.pipe(concat('stylesheet.css'))
.pipe(cleanCss())
.pipe(rev())
.pipe(dest('public/dist/css'))
.pipe(rev.manifest('public/dist/manifest.json', {
merge: true
}));
};
exports.build = series(clearJs, clearCss, parallel(packCss, packJs));