UNPKG

2.6 kBMarkdownView Raw
1ape-tasking
2==========
3
4<!---
5This file is generated by ape-tmpl. Do not update manually.
6--->
7
8<!-- Badge Start -->
9<a name="badges"></a>
10
11[![Build Status][bd_travis_shield_url]][bd_travis_url]
12[![npm Version][bd_npm_shield_url]][bd_npm_url]
13[![JS Standard][bd_standard_shield_url]][bd_standard_url]
14
15[bd_repo_url]: https://github.com/ape-repo/ape-tasking
16[bd_travis_url]: http://travis-ci.org/ape-repo/ape-tasking
17[bd_travis_shield_url]: http://img.shields.io/travis/ape-repo/ape-tasking.svg?style=flat
18[bd_travis_com_url]: http://travis-ci.com/ape-repo/ape-tasking
19[bd_travis_com_shield_url]: https://api.travis-ci.com/ape-repo/ape-tasking.svg?token=
20[bd_license_url]: https://github.com/ape-repo/ape-tasking/blob/master/LICENSE
21[bd_codeclimate_url]: http://codeclimate.com/github/ape-repo/ape-tasking
22[bd_codeclimate_shield_url]: http://img.shields.io/codeclimate/github/ape-repo/ape-tasking.svg?style=flat
23[bd_codeclimate_coverage_shield_url]: http://img.shields.io/codeclimate/coverage/github/ape-repo/ape-tasking.svg?style=flat
24[bd_gemnasium_url]: https://gemnasium.com/ape-repo/ape-tasking
25[bd_gemnasium_shield_url]: https://gemnasium.com/ape-repo/ape-tasking.svg
26[bd_npm_url]: http://www.npmjs.org/package/ape-tasking
27[bd_npm_shield_url]: http://img.shields.io/npm/v/ape-tasking.svg?style=flat
28[bd_standard_url]: http://standardjs.com/
29[bd_standard_shield_url]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg
30
31<!-- Badge End -->
32
33
34<!-- Description Start -->
35<a name="description"></a>
36
37ape framework module for tasks
38
39<!-- Description End -->
40
41
42
43
44<!-- Sections Start -->
45<a name="sections"></a>
46
47<!-- Section from "doc/guides/02.Usage.md.hbs" Start -->
48
49<a name="section-doc-guides-02-usage-md"></a>
50
51Usage
52----
53
54### Run Tasks
55
56`.runTasks(taskName, tasks, exitWhenDone)`
57
58```javascript
59#!/usr/bin/env node
60
61'use strict'
62
63const apeTasking = require('ape-tasking')
64
65// Run tasks
66apeTasking.runTasks('myCustomTask', [
67 // Run callback base task
68 (callback) => {
69 /* ... */
70 callback(null) // Pass error if failed.
71 },
72 // Run promise base task
73 () => new Promise((resolve, reject) => {
74 /* ... */
75 resolve()
76 })
77], true)
78
79```
80
81<!-- Section from "doc/guides/02.Usage.md.hbs" End -->
82
83
84<!-- Sections Start -->
85
86
87<!-- LICENSE Start -->
88<a name="license"></a>
89
90License
91-------
92This software is released under the [MIT License](https://github.com/ape-repo/ape-tasking/blob/master/LICENSE).
93
94<!-- LICENSE End -->
95
96
97<!-- Links Start -->
98<a name="links"></a>
99
100Links
101------
102
103+ [ape-repo][ape_repo_url]
104
105[ape_repo_url]: https://github.com/ape-repo
106
107<!-- Links End -->