mirror of
https://github.com/boostorg/unordered-ui-bundle.git
synced 2026-01-19 04:42:15 +00:00
- move gulpfile.js folder to gulp.d - move gulpfile.js/index.js back to gulpfile.js - rename task to createTask - import tasks under task namespace
15 lines
413 B
JavaScript
15 lines
413 B
JavaScript
'use strict'
|
|
|
|
module.exports = (...tasks) => {
|
|
const seed = {}
|
|
if (tasks.length) {
|
|
if (tasks.lastIndexOf(tasks[0]) > 0) {
|
|
const task1 = tasks.shift()
|
|
seed.default = Object.assign(task1.bind(null), { description: `=> ${task1.displayName}`, displayName: 'default' })
|
|
}
|
|
return tasks.reduce((acc, it) => (acc[it.displayName || it.name] = it) && acc, seed)
|
|
} else {
|
|
return seed
|
|
}
|
|
}
|