This repository has been archived by the owner on Jan 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 89
/
gulpfile.js
59 lines (52 loc) · 1.48 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
const gulp = require('gulp');
const del = require('del');
const merge = require('merge-stream');
const paths = {};
paths.dist = './_site/';
paths.sass = './_scss/';
paths.libDir = './lib/';
paths.npmDir = './node_modules/';
paths.cssDir = './css/';
paths.jsDir = './scripts/';
function cleanLib() {
return del(paths.libDir)
}
function cleanDist() {
return del(paths.dist)
}
function lib() {
var libs = [
{
src: paths.npmDir + 'bootstrap/dist/js/bootstrap.min.js',
dest: paths.libDir + 'bootstrap/js'
},
{
src: [
paths.npmDir + 'font-awesome/**/css/font-awesome.min.css',
paths.npmDir + 'font-awesome/**/fonts/*'
],
dest: paths.libDir + 'font-awesome'
},
{
src: paths.npmDir + 'jquery/dist/jquery.min.js',
dest: paths.libDir + 'jquery'
},
{
src: paths.npmDir + 'lunr/lunr.js',
dest: paths.libDir + 'lunr'
},
{
src: paths.npmDir + 'fluidbox/dist/**/*',
dest: paths.libDir + 'fluidbox'
}
];
var tasks = libs.map((lib) => {
return gulp.src(lib.src).pipe(gulp.dest(lib.dest));
});
return merge(tasks);
}
exports.build = gulp.series(gulp.parallel(cleanLib, cleanDist), lib);
exports['clean:dist'] = cleanDist;
exports['clean:lib'] = cleanLib;
exports.clean = gulp.parallel(cleanLib, cleanDist);
exports.lib = gulp.series(cleanLib, lib);