-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
35 lines (31 loc) · 829 Bytes
/
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
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
var paths = {
src: "./src",
build: "./build"
};
gulp.task('manifest', function() {
gulp.src(paths.src + '/manifest.json')
.pipe(gulp.dest(paths.build));
});
gulp.task('scripts', function() {
gulp.src(paths.src + '/*.js')
.pipe($.uglify({ mangle: true }))
.pipe(gulp.dest(paths.build));
});
gulp.task('markup', function() {
gulp.src(paths.src + '/*.html')
.pipe(gulp.dest(paths.build));
});
gulp.task('images', function() {
gulp.src(paths.src + '/images/**')
.pipe($.imagemin())
.pipe(gulp.dest(paths.build));
});
gulp.task('deploy', function(){
gulp.src(paths.build + '/**')
.pipe($.zip('dota2betalert.zip'))
.pipe(gulp.dest('./'));
});
gulp.task('build', ['manifest', 'scripts', 'markup', 'images']);
gulp.task('default', ['build']);