-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGulpfile.js
59 lines (54 loc) · 1.84 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
var gulp = require('gulp'),
gp_concat = require('gulp-concat'),
gp_rename = require('gulp-rename'),
gp_uglify = require('gulp-uglify');
gulp.task('js-lib-min', function() {
return gulp.src([
'bower_components/jquery/dist/jquery.min.js',
'bower_components/datatables/media/js/jquery.dataTables.min.js',
'bower_components/nprogress/nprogress.js',
'bower_components/select2/dist/js/select2.min.js',
'bower_components/mark.js/dist/jquery.mark.js',
'bower_components/datatables.mark.js/dist/datatables.mark.min.js',
])
.pipe(gp_concat('concat.js'))
.pipe(gulp.dest('src/tmp'))
.pipe(gp_rename('easyroutes-libs.min.js'))
.pipe(gp_uglify())
.pipe(gulp.dest('src/dist/js'));
});
gulp.task('js-min', function() {
return gulp.src([
'src/assets/js/scripts.js',
])
.pipe(gp_concat('concat.js'))
.pipe(gulp.dest('src/tmp'))
.pipe(gp_rename('easyroutes.min.js'))
.pipe(gp_uglify())
.pipe(gulp.dest('src/dist/js'));
});
gulp.task('css-lib-min', function() {
return gulp.src([
'bower_components/flexbox-grid/dist/flexbox-grid.min.css',
'src/assets/css/easyroutes-datatable-theme.css',
'bower_components/nprogress/nprogress.css',
'bower_components/select2/dist/css/select2.min.css',
// 'bower_components/datatables.mark.js/dist/datatables.mark.min.css',
'src/assets/css/easyroutes.css',
])
.pipe(gp_concat('concat.css'))
.pipe(gulp.dest('src/tmp'))
.pipe(gp_rename('easyroutes-libs.min.css'))
// .pipe(gp_uglify())
.pipe(gulp.dest('src/dist/css'));
});
gulp.task('copy-images', function() {
return gulp.src('bower_components/datatables/media/images/**')
.pipe( gulp.dest('src/dist/images') );
});
gulp.task('default', [
'js-min',
'js-lib-min',
'css-lib-min',
'copy-images'
], function() {});