-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
50 lines (46 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
var gulp = require('gulp')
var less = require('gulp-less')
var gp_concat = require('gulp-concat')
var gp_rename = require('gulp-rename')
var gp_uglify = require('gulp-uglify')
var minifyCSS = require('gulp-minify-css')
var autoprefixer = require('gulp-autoprefixer')
var path = require('path')
gulp.task('css', function(){
return gulp.src(
[
'./public/assets/css/font-awesome.min.css',
'./public/assets/css/ie8.css',
'./public/assets/css/main.css'
]
)
.pipe(minifyCSS())
.pipe(autoprefixer('last 2 version', 'safari 5', 'ie 8', 'ie 9'))
.pipe(gp_concat('style.min.css'))
.pipe(gulp.dest('./public/build/css/'))
})
gulp.task('build', function(){
return gulp.src(
[
'./public/assets/js/jquery.min.js',
'./public/assets/js/jquery.dropotron.min.js',
'./public/assets/js/jquery.slidertron.min.js',
'./public/assets/js/skel.min.js',
'./public/assets/js/skel-viewport.min.js',
'./public/assets/js/util.js.js',
'./public/assets/js/main.js'
]
)
.pipe(gp_concat('gulp-concat.js'))
.pipe(gulp.dest('./public/min/'))
.pipe(gp_rename('vendor.min.js'))
.pipe(gp_uglify())
.pipe(gulp.dest('./public/build/'));
})
gulp.task('copy', function(){
return gulp.src(
['./public/assets/fonts/**']
)
.pipe(gulp.dest('./public/build/fonts/'))
})
gulp.task('default', ['css', 'build','copy'], function(){})