-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
Gulpfile.js
65 lines (57 loc) · 1.34 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
var gulp = require('gulp')
var uglify = require('gulp-uglify');
var cssmin = require('gulp-cssmin');
var rename = require('gulp-rename');
gulp.task('js-minify', function (done) {
gulp.src('./src/js/jquery.bxslider.js')
.pipe(uglify({
preserveComments: 'license'
}))
.pipe(rename({ suffix: '.min' }))
.pipe(gulp.dest('./dist'));
done();
});
gulp.task('js-copy-src', function (done) {
gulp.src('./src/js/jquery.bxslider.js')
.pipe(gulp.dest('./dist'));
done();
});
gulp.task('css-minify', function (done) {
gulp.src('./src/css/jquery.bxslider.css')
.pipe(cssmin())
.pipe(rename({ suffix: '.min' }))
.pipe(gulp.dest('./dist'));
done();
});
gulp.task('css-copy-src', function (done) {
gulp.src('./src/css/jquery.bxslider.css')
.pipe(gulp.dest('./dist'));
done();
});
gulp.task('vendor-copy-src', function (done) {
gulp.src('./src/vendor/*')
.pipe(gulp.dest('./dist/vendor'));
done();
});
gulp.task('images-copy-src', function (done) {
gulp.src('./src/images/*')
.pipe(gulp.dest('./dist/images'));
done();
});
gulp.task('docs-copy-src', function (done) {
gulp.src([
'./readme.md',
'./LICENSE.md'
])
.pipe(gulp.dest('./dist'));
done();
});
gulp.task('default', gulp.series(
'js-minify',
'js-copy-src',
'css-minify',
'css-copy-src',
'vendor-copy-src',
'images-copy-src',
'docs-copy-src'
));