-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathgulpfile.babel.js
44 lines (40 loc) · 1.06 KB
/
gulpfile.babel.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
import gulp from 'gulp'
import { getEnv } from './build-tasks/utils'
import {
compileScripts,
lintScripts,
watchScripts,
} from './build-tasks/scripts'
import { compileStyles, lintStyles, watchStyles } from './build-tasks/styles'
import { compileMarkup, watchMarkup } from './build-tasks/markup'
import { compile, lint, watch as watchEverything } from './build-tasks/main'
import { deploy } from './build-tasks/deploy'
import { stat } from './build-tasks/stat'
import { serve as serveEverything } from './build-tasks/server'
export {
deploy,
serveEverything as serve,
stat,
compile,
lint,
watchEverything as watch,
compileScripts,
compileMarkup,
compileStyles,
lintScripts,
lintStyles,
watchScripts,
watchStyles,
watchMarkup,
}
const env = getEnv()
// NOTE:: wrapper functions necessary to get metadata for tasks as intended
const serve = (cb) => serveEverything(cb)
const watch = (cb) => watchEverything(cb)
const defaultTasks = env.deploy
? gulp.series(deploy)
: gulp.parallel(
serve,
watch,
)
export default defaultTasks