This repository has been archived by the owner on Nov 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
gulpfile.js
112 lines (98 loc) · 3.39 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
var gulp = require('gulp');
var concat = require('gulp-concat');
// var minify = require('gulp-minify');
var concatCss = require('gulp-concat-css');
var cleanCSS = require('gulp-clean-css');
var runSequence = require('run-sequence');
var del = require('del');
var babel = require('gulp-babel');
var uglify = require('gulp-uglify');
var pump = require('pump');
var minify = require('gulp-minify');
var minify = require("gulp-babel-minify");
gulp.task("minify-js", () =>
gulp.src("./files/js/compress.js")
.pipe(minify({
mangle: {
keepClassName: true
}
}))
.pipe(gulp.dest("./files/dist"))
);
gulp.task('minify-css', function () {
return gulp.src('./files/dist/*.css')
.pipe(cleanCSS())
.pipe(gulp.dest('./files/dist'));
});
gulp.task('compress-css', function () {
return gulp.src([
'files/css/animate.css',
'files/css/style.css',
'files/css/font-awesome.min.css',
'files/css/ionicons.css',
'files/css/icomoon.css',
// 'files/revolution/css/settings.css',
// 'files/revolution/css/layers.css',
// 'files/revolution/css/navigation.css',
'files/css/owl.carousel.css',
'files/css/lightcase.css',
'files/css/billboard.css',
'files/css/mqueries.css',
'files/css/step-form-wizard-all.css',
'files/css/jquery.mCustomScrollbar.min.css',
])
.pipe(concatCss("compress.css"))
.pipe(gulp.dest('files/dist/'));
});
gulp.task('compress-js', function () {
return gulp.src(
[
'files/js/jquery_2_2_4.js',
'files/js/jquery.easing.1.3.js',
'files/js/jquery.visible.min.js',
// 'files/revolution/js/jquery.themepunch.tools.min.js?rev=5.0',
// 'files/revolution/js/jquery.themepunch.revolution.min.js?rev=5.0',
// 'files/revolution/js/extensions/revolution.extension.slideanims.min.js',
// 'files/revolution/js/extensions/revolution.extension.layeranimation.min.js',
// 'files/revolution/js/extensions/revolution.extension.navigation.min.js',
//
// 'files/revolution/js/extensions/revolution.extension.video.min.js',
// 'files/revolution/jss/extensions/revolution.extension.actions.min.js',
// 'files/js/tweenMax.js',
'files/js/jquery.backgroundparallax.min.js',
'files/js/jquery.isotope.min.js',
'files/js/jquery.imagesloaded.min.js',
// 'files/js/jquery.owl.carousel.js',
// 'files/js/jquery.lightcase.min.js',
'files/js/script.js',
'files/js/jquery.ajaxchimp.min.js',
// 'files/js/jquery.countdown.min.js',
'files/js/social.js',
//
'files/js/jquery.countdown.js',
'files/js/step-form-wizard.min.js',
'files/js/jquery.mCustomScrollbar.concat.min.js',
//newly commented 05.03
'files/js/d3.js',
//newly commented 05.03
'files/js/custom.js',
'files/js/billboard.js',
'files/js/chart.js',
//newly commented 05.03 end
'files/js/index.js'
])
.pipe(concat('compress.js'))
.pipe(gulp.dest('./files/js'));
});
gulp.task('clean:dist', function () {
return del.sync('files/dist');
});
gulp.task('css', function (callback) {
runSequence('compress-css', 'minify-css', callback);
});
gulp.task('default', function (callback) {
runSequence('clean:dist', 'compress-css', 'minify-css', 'compress-js',
'minify-js',
callback
)
});