-
Notifications
You must be signed in to change notification settings - Fork 15
/
gulpfile.js
52 lines (43 loc) · 1.23 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
var gulp = require('gulp');
var uglify = require('gulp-uglify');
var cleanCss = require('gulp-clean-css');
var clean = require('gulp-clean');
var concat = require('gulp-concat');
var del = require('del');
gulp.task('clean', function() {
return del(['dist/fonts/raleway/*', 'dist/fonts/*', 'dist/images/installer/*', 'dist/images/*', 'dist/*']);
});
gulp.task('styles', function() {
gulp.src('css/*')
.pipe(cleanCss())
.pipe(concat('style.css'))
.pipe(gulp.dest('./dist/'))
});
gulp.task('libs', function() {
gulp.src('js/*')
.pipe(uglify())
.pipe(concat('libs.js'))
.pipe(gulp.dest('./dist'))
});
gulp.task('images', function() {
gulp.src('images/*')
.pipe(gulp.dest('./dist/images'))
gulp.src('images/installer/*')
.pipe(gulp.dest('./dist/images/installer'))
gulp.src('images/sponsor/*')
.pipe(gulp.dest('./dist/images/sponsor'))
});
gulp.task('favicon', function() {
gulp.src('favicon.ico')
.pipe(gulp.dest('./dist'));
});
gulp.task('fonts', function() {
gulp.src('fonts/*')
.pipe(gulp.dest('./dist/fonts'))
});
gulp.task('html', function() {
gulp.src('*.html')
.pipe(gulp.dest('./dist'));
});
var tasks = ['clean', 'styles', 'libs', 'fonts', 'images', 'favicon', 'html'];
gulp.task('default', tasks);