-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgulpfile.js
More file actions
39 lines (33 loc) · 1003 Bytes
/
gulpfile.js
File metadata and controls
39 lines (33 loc) · 1003 Bytes
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
const gulp = require('gulp');
const imageResize = require('gulp-image-resize');
const zip = require('gulp-zip');
const filter = require('gulp-filter');
var DEST = 'gen/';
function dest(x="") { return gulp.dest(DEST+"/"+x); }
gulp.task('js', function() {
gulp.src('static/*.js')
.pipe(dest());
});
gulp.task('images', function() {
gulp.src('static/images/background-*.png')
.pipe(imageResize({width: 64, height:64, crop: false, upscale: false}))
.pipe(dest('images'));
gulp.src('static/images/plane.svg')
.pipe(dest('images'));
gulp.src('static/images/favicon.png')
.pipe(dest('images'));
});
gulp.task('html', function() {
gulp.src('static/*.html')
.pipe(dest());
});
gulp.task('css', function() {
gulp.src('static/*.css')
.pipe(dest());
});
gulp.task('default', ['js', 'images', 'html', 'css'], function() {
gulp.src(['gen/**/*', '*.py', 'README.md'])
.pipe(filter('!gen/Hit-It-chat.zip'))
.pipe(zip('Hit-It-chat.zip'))
.pipe(dest());
});