1 | /**
|
2 | * Demo of task project.
|
3 | * @function apemanDemoTask
|
4 | * @param {object} [options] - Optional settings.
|
5 | * @returns {function} - Defined task function.
|
6 | */
|
7 |
|
8 |
|
9 |
|
10 | const co = require('co')
|
11 |
|
12 | /** @lends define */
|
13 | function define (options = {}) {
|
14 | /**
|
15 | * Defined task.
|
16 | * @function task
|
17 | * @param {object} context - Apeman task context.
|
18 | * @returns {Promise}
|
19 | */
|
20 | function task (context) {
|
21 | let { logger } = context
|
22 |
|
23 | return co(function * () {
|
24 |
|
25 | })
|
26 | }
|
27 |
|
28 | Object.assign(task, {
|
29 | /**
|
30 | * Description of this task.
|
31 | */
|
32 | $desc: '__your_task_description__'
|
33 | })
|
34 |
|
35 | return task
|
36 | }
|
37 |
|
38 | module.exports = define
|