forked from bitwarden/help
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
63 lines (56 loc) · 1.64 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
const gulp = require('gulp');
const del = require('del');
const merge = require('merge-stream');
const paths = {};
paths.dist = './_site/';
paths.sass = './_sass/';
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-sass/assets/javascripts/bootstrap.min.js',
dest: paths.libDir + 'bootstrap/js'
},
{
src: paths.npmDir + 'bootstrap-sass/assets/fonts/bootstrap/*',
dest: paths.libDir + 'bootstrap/fonts'
},
{
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);