-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathgulpfile.js
52 lines (47 loc) · 1.25 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
const gulp = require('gulp')
const paths = require('./tasks/paths')
gulp.task('clean', require('./tasks/clean'))
gulp.task('glyphs', require('./tasks/glyphs'))
gulp.task('eslint', require('./tasks/eslint'))
gulp.task('stylelint', require('./tasks/stylelint'))
gulp.task('styles', require('./tasks/styles'))
gulp.task('styles:docs', require('./tasks/styles-docs'))
gulp.task('scripts', require('./tasks/scripts'))
gulp.task('metalsmith', require('./tasks/metalsmith'))
gulp.task('server', require('./tasks/server'))
gulp.task('ghpages', require('./tasks/ghpages'))
gulp.task('watch', () => {
gulp.watch([paths.docs.layout.glob, paths.docs.pages.glob], gulp.series('metalsmith'))
gulp.watch(paths.docs.css.glob, gulp.series('styles:docs'))
gulp.watch(paths.src.css.glob, gulp.series('stylelint', 'styles', 'styles:docs'))
gulp.watch(paths.src.js.glob, gulp.series('eslint', 'scripts'))
})
gulp.task('build',
gulp.series(
'glyphs',
gulp.parallel(
'stylelint',
'styles',
'eslint',
'scripts'
)
)
)
gulp.task('default',
gulp.series(
'clean',
'metalsmith',
'build',
'styles:docs',
'server',
'watch'
)
)
gulp.task('deploy',
gulp.series(
'metalsmith',
'build',
'styles:docs',
'ghpages'
)
)