forked from binary-com/binary-bot
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathgulpfile.babel.js
More file actions
68 lines (58 loc) · 1.22 KB
/
gulpfile.babel.js
File metadata and controls
68 lines (58 loc) · 1.22 KB
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
65
66
67
import gulp from 'gulp'
import watch from 'gulp-watch'
import ghPages from 'gulp-gh-pages'
import connect from 'gulp-connect'
import open from 'gulp-open'
import './gulp/i18n'
import './gulp/mock'
import './gulp/build'
gulp.task('connect', () => {
connect.server({
root: 'www',
port: 8080,
livereload: true,
})
})
gulp.task('open', () =>
gulp.src('www/index.html').pipe(
open({
uri: 'http://localhost:8080/',
}),
),
)
gulp.task('serve', ['open', 'connect'], () => {
watch(['www/*.html']).pipe(connect.reload())
})
gulp.task('deploy', ['build-min'], () =>
gulp
.src([
'404.md',
'LICENSE',
'CNAME',
'./www/**',
'./beta/**',
'./translation/**',
])
.pipe(ghPages()),
)
gulp.task('test-deploy', ['build-min', 'serve'], () => {})
gulp.task('watch-static', () =>
gulp.watch(
['static/xml/**/*', 'static/*.html', 'static/css/*.scss'],
{
debounceTimeout: 1000,
},
['build-dev-static'],
),
)
gulp.task('watch-html', () =>
gulp.watch(
['templates/**/*'],
{
debounceTimeout: 1000,
},
['build-dev-html'],
),
)
gulp.task('watch', ['serve', 'build', 'watch-static', 'watch-html'])
gulp.task('default', ['watch'])