-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
33 lines (27 loc) · 813 Bytes
/
index.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
'use strict';
module.exports = (gulp, gulpfileExports, config) => {
const helpers = require('./lib/helpers.js');
if (!config) {
config = helpers.loadConfig();
}
let mainTasks = {
lint: [],
build: [],
watch: []
};
if (config.browsersync) {
require('./lib/browsersync.js')(gulp, gulpfileExports, config.browsersync, mainTasks);
}
if (config.sass) {
require('./lib/sass.js')(gulp, gulpfileExports, config.sass, mainTasks);
}
gulpfileExports.lint = gulp.parallel(mainTasks.lint);
gulpfileExports.build = gulp.series(mainTasks.build);
gulpfileExports.watch = gulp.parallel(mainTasks.watch);
gulpfileExports.default = gulp.series(
gulpfileExports.lint, gulpfileExports.build, gulpfileExports.watch);
return {
config: config,
helpers: helpers
}
};