-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
44 lines (35 loc) · 1.25 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
'use strict';
var commandLineArgs = require('command-line-args');
var gulp = require('gulp');
var gutil = require('gulp-util');
var concat = require('gulp-concat');
var rename = require('gulp-rename');
var gzip = require('gulp-gzip');
// Process command and then look for options
var cmdArgs = commandLineArgs({ name: 'command', defaultOption: true },
{ stopAtFirstUnknown: true });
const optionDefinitions = [
{ name: 'recent', alias: 'r', type: Number, multiple: false},
{ name: 'test-website', alias: 't', type: Boolean, defaultValue: false }
];
cmdArgs = commandLineArgs(optionDefinitions,
{ argv: cmdArgs._unknown || [],
camelCase: true});
// --------------------------------------------------
var kanisterProdFiles = [
'app/dist/kanister-io/*',
'app/dist/assets/css/main.*',
'app/dist/favicon-kanister.ico',
'app/dist/assets/img/kanister_thumbnail.png',
'app/dist/assets/svg/cncf-icon-color.svg'
];
gulp.task('build-kanister', function() {
gutil.log(gutil.colors.green(`Copying files to _site/ ...`));
return gulp
.src(kanisterProdFiles)
.pipe(gulp.dest('_site/'));
});
// --------------------------------------------------
gulp.task('default', gulp.series('build-kanister', function buildDefault(done) {
done();
}));