This repository has been archived by the owner on Aug 9, 2020. It is now read-only.
/
gulpfile.js
74 lines (62 loc) · 1.86 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
const {
src,
dest,
series
} = require('gulp');
const concat = require('gulp-concat');
const htmlmin = require('gulp-htmlmin');
// const gulpCopy = require('gulp-copy');
const destination = "./docs/";
function js() {
return src(['src/static/js/modal-fx.min.js',
'src/static/js/quill/quill.min.js',
// 'src/static/js/jspdf.min.js',
'src/static/js/lz-string.js',
'src/static/js/main.js'
])
.pipe(concat('all.min.js'))
.pipe(dest(destination + "/static/"));
}
function html() {
return src("src/index.html")
.pipe(htmlmin({
collapseWhitespace: true,
removeComments: true
}))
.pipe(dest(destination));
}
function CopyFavicons() {
return src("src/static/favicons/**")
.pipe(dest("docs/static/favicons"));
}
function CopyIcons() {
return src("src/static/icons/**")
.pipe(dest("docs/static/icons"));
}
function CopyFonts() {
return src("src/static/orbitron/*.woff2")
.pipe(dest("docs/static/orbitron"));
}
function CopyImages() {
return src(["src/static/imgs/pattern-min.png", "src/static/imgs/scover.png"])
.pipe(dest("docs/static/imgs"));
}
function CopyExtras() {
return src(["src/sw.js", "src/manifest.json", "src/CNAME", "src/.nojekyll"])
.pipe(dest("docs/"));
}
function CopyQuillMap() {
return src("src/static/quill.min.js.map")
.pipe(dest("docs/static"));
}
exports.js = js;
exports.html = html;
exports.CopyExtras = CopyExtras;
exports.CopyFavicons = CopyFavicons;
exports.CopyFonts = CopyFonts;
exports.CopyIcons = CopyIcons;
exports.CopyImages = CopyImages;
exports.CopyQuillMap = CopyQuillMap;
copytasks = series(CopyExtras, CopyFavicons, CopyFonts, CopyIcons, CopyImages, CopyQuillMap);
exports.runall = series(html, js, copytasks);
exports.default = series(html, js, copytasks);