This repository was archived by the owner on Sep 14, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathgulpfile.babel.js
More file actions
61 lines (55 loc) · 1.29 KB
/
gulpfile.babel.js
File metadata and controls
61 lines (55 loc) · 1.29 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
'use strict'
// Load gulp
import gulp from 'gulp'
// Load modules to run tasks from files
import requireDir from 'require-dir'
import runSequence from 'run-sequence'
const tasks = requireDir(__dirname + '/tasks') // eslint-disable-line
// Build website, either with development or minified assets and run server with live reloading
gulp.task('default', (callback) => {
runSequence(
'clean',
'cachebusting',
'metalsmith',
'standardlint',
'standardlinttests',
'mocha',
['htmlmin', 'svgsprite', 'scss', 'webpack', 'img', 'copy'],
['browsersync', 'watch'],
callback
)
})
// Build website, either with development or minified assets depending on flag
gulp.task('deploy', (callback) => {
runSequence(
'clean',
'cachebusting',
'metalsmith',
'standardlint',
'standardlinttests',
'mocha',
['htmlmin', 'svgsprite', 'scss', 'webpack', 'img', 'copy'],
'crticalcss',
callback
)
})
// Run a task to check the code
gulp.task('auditcode', (callback) => {
runSequence(
'scssfmt',
'scsslint',
'standardlint',
'standardlinttests',
'mocha',
callback
)
})
// Run a task to build website and add tota11y
gulp.task('audita11y', (callback) => {
runSequence(
'deploy',
'tota11y',
'browsersync',
callback
)
})