forked from stevenwanderski/bxslider-4
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gulpfile.js
58 lines (50 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
53
54
55
56
57
58
var gulp = require('gulp')
var uglify = require('gulp-uglify');
var cssmin = require('gulp-cssmin');
var rename = require('gulp-rename');
gulp.task('js-minify', function () {
gulp.src('./src/js/jquery.bxslider.js')
.pipe(uglify({
preserveComments: 'license'
}))
.pipe(rename({ suffix: '.min' }))
.pipe(gulp.dest('./dist'));
});
gulp.task('js-copy-src', function () {
gulp.src('./src/js/jquery.bxslider.js')
.pipe(gulp.dest('./dist'));
});
gulp.task('css-minify', function () {
gulp.src('./src/css/jquery.bxslider.css')
.pipe(cssmin())
.pipe(rename({ suffix: '.min' }))
.pipe(gulp.dest('./dist'));
});
gulp.task('css-copy-src', function () {
gulp.src('./src/css/jquery.bxslider.css')
.pipe(gulp.dest('./dist'));
});
gulp.task('vendor-copy-src', function () {
gulp.src('./src/vendor/*')
.pipe(gulp.dest('./dist/vendor'));
});
gulp.task('images-copy-src', function () {
gulp.src('./src/images/*')
.pipe(gulp.dest('./dist/images'));
});
gulp.task('docs-copy-src', function () {
gulp.src([
'./readme.md',
'./LICENSE.md'
])
.pipe(gulp.dest('./dist'));
});
gulp.task('default', [
'js-minify',
'js-copy-src',
'css-minify',
'css-copy-src',
'vendor-copy-src',
'images-copy-src',
'docs-copy-src'
]);