-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.babel.js
45 lines (34 loc) · 1.25 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
45
/**
* This is the main gulp module.
* Tasks are defined here.
* @module gulpfile
*/
/** Import module dependencies. */
import gulp from 'gulp'
/** Import private tasks */
import { stylelint, eslint } from './tasks/linters'
import { styles, scripts } from './tasks/assets'
import { watch } from './tasks/watcher'
import { notifications } from './tasks/notifications'
import { browserSyncInit } from './tasks/browsersync'
/** Individual tasks, can be used from CLI. */
gulp.task(stylelint)
gulp.task(eslint)
gulp.task(styles)
gulp.task(scripts)
gulp.task(watch)
/** Linting bundle. */
const linting = gulp.series(stylelint, eslint)
/** Gulp config for this task. */
linting.description = 'Do a check on every style and script file and report linting errors'
/** Assets bundle. */
const assets = gulp.parallel(styles, scripts)
/** Gulp config for this task. */
assets.description = 'Builds assets with different parameters depending on the environment'
/** Build bundle. */
const build = gulp.parallel(browserSyncInit, gulp.series(assets, linting, notifications, watch))
/** Gulp config for this task. */
build.description = 'Builds the site with automatic parameters depending on the environment'
export { build, linting, assets }
/** Default task */
export default build