-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
37 lines (30 loc) · 1.78 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
/* ------------------------------------------------------------------------------------------ */
/* GULPFILE */
/* ------------------------------------------------------------------------------------------ */
/* REQUIRE'S */
/* ------------------------------------------------------------------------------------------ */
const config = require('./gulp/config')
const app = require('./gulp/tasks/app.tasks')
const html = require('./gulp/tasks/html.tasks')
const css = require('./gulp/tasks/css.tasks')
const js = require('./gulp/tasks/js.tasks')
const inject = require('./gulp/tasks/inject.tasks')
const img = require('./gulp/tasks/img.tasks')
const del = require('./gulp/tasks/del.tasks')
const server = require('./gulp/tasks/server.tasks')
const watch = require('./gulp/tasks/watch.tasks')
/* LOAD OPTIONS */
/* ------------------------------------------------------------------------------------------ */
const cssTasks = config.options.css.taskType === 'all' ? css.cssAllTasks : [css.cssVendorsTasks, css.cssAppTasks]
const jsTasks = config.options.js.taskType === 'all' ? js.jsAllTasks : [js.jsVendorsTasks, js.jsAppTasks]
/* ENVIRONMENT TASKS */
/* ------------------------------------------------------------------------------------------ */
function defaultDev() {
module.exports.default =
config.gulp.series(del.delBuildTasks, del.delLogTasks, app.appTasks, html.htmlTasks, del.delHtmlTasks, cssTasks, jsTasks, inject.injectTasks, img.imgTasks, config.gulp.parallel(server.serverTasks, watch.watchTasks))
}
function defaultProd() {
module.exports.default =
config.gulp.series(del.delBuildTasks, del.delLogTasks, app.appTasks, html.htmlTasks, del.delHtmlTasks, cssTasks, jsTasks, inject.injectTasks, img.imgTasks)
}
config.env.development() ? defaultDev() : defaultProd()