-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgulpfile.js
64 lines (57 loc) · 1.44 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
var gulp = require('gulp');
var autoprefixer = require('gulp-autoprefixer');
var concat = require('gulp-concat');
var concat_css = require('gulp-concat-css');
var cssretarget = require('gulp-cssretarget');
var insert = require('gulp-insert');
var minify_css = require('gulp-minify-css');
var uglify = require('gulp-uglify');
var js_files = [
'assets/js/Ajax.js',
'assets/js/Date.js',
'assets/js/Modal.js',
'assets/js/Month.js',
'assets/js/Notification.js',
'assets/js/Planner.js',
'assets/js/Week.js',
'assets/js/main.js'
];
var css_files = [
'assets/css/animate.css',
'assets/css/flash.css',
'assets/css/grid.css',
'assets/css/header.css',
'assets/css/modal.css',
'assets/css/planner.css',
'assets/css/main.css'
];
// Css task.
gulp.task('css', function() {
gulp.src(css_files)
.pipe(concat_css('app.min.css'))
.pipe(cssretarget())
.pipe(minify_css({
keepSpecialComments: '*',
keepBreaks:false
}))
.pipe(gulp.dest(''));
});
// Javascript task.
gulp.task('js', function() {
gulp.src(js_files)
.pipe(concat('app.min.js').on('error', function(e){
console.log(e);
}))
.pipe(uglify().on('error', function(e){
console.log(e);
}))
.pipe(gulp.dest('').on('error', function(e){
console.log(e);
}));
});
// Watch for changes
// gulp.task('watch', function() {
// gulp.watch('**/*.less', ['less']);
//gulp.watch('assets/css/**/*.css', ['css']);
//gulp.watch('assets/js/**/*.js', ['js']);
// });