-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
55 lines (48 loc) · 1.09 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
'use strict'
const $ = require('gulp-load-plugins')()
const gulp = require('gulp')
gulp.task ('styles', () => gulp
.src('css/less/*.less')
.pipe($.less())
.pipe($.minifyCss())
.pipe($.concat('css.css'))
.pipe(gulp.dest('css/'))
)
gulp.task ('dash', () => gulp
.src('js/dash/*.js')
.pipe($.order([
'js/dash/dash-utils.js',
'js/dash/*.js'
]))
.pipe($.uglify())
.pipe($.concat('dash.min.js'))
.pipe(gulp.dest('js/assets/'))
)
gulp.task ('fb', () => gulp
.src('js/libs/fb.js')
.pipe($.uglify())
.pipe($.concat('fb.min.js'))
.pipe(gulp.dest('js/libs/'))
)
gulp.task ('libs', () => gulp
.src([
'js/libs/jquery*',
'js/libs/keypress*',
'js/libs/hammer.min.js'
])
.pipe($.uglify())
.pipe($.concat('libs.min.js'))
.pipe(gulp.dest('js/assets/'))
)
gulp.task ('scripts', ['dash', 'libs'], () => gulp
.src('js/assets/*.js')
.pipe($.uglify())
.pipe($.order([
'libs.min.js',
'dash.min.js',
'common.js'
]), { base: './js/assets' })
.pipe($.concat('script.min.js'))
.pipe(gulp.dest('js/'))
)
gulp.task ('default', ['styles', 'fb', 'scripts'])