Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
cd6407f189 | |||
ca2afbd8c7 |
11
README.md
11
README.md
@ -28,14 +28,15 @@ npm install taskbuffer --save
|
|||||||
* Task is compatible to gulp streams.
|
* Task is compatible to gulp streams.
|
||||||
|
|
||||||
### class `TaskChain`
|
### class `TaskChain`
|
||||||
* Multiple Tasks can be combined in a bigger task using a Taskchain.
|
* TaskChain extends Task.
|
||||||
* Taskchain extends Task.
|
* Multiple Tasks can be combined in a bigger task using a TaskChain.
|
||||||
* While the tasks are async in themselve, TaskChain **runs Tasks serialized** (one after the other)
|
* While the tasks are async in themselve, TaskChain **runs Tasks serialized** (one after the other)
|
||||||
* that means that tasks can rely on each other and
|
* that means that tasks can rely on each other and
|
||||||
|
|
||||||
### class `TaskParallel`
|
### class `TaskParallel`
|
||||||
|
* TaskParallel extends Task.
|
||||||
* like TaskChain, however **tasks run in parallel**
|
* like TaskChain, however **tasks run in parallel**
|
||||||
* Tasks cannot rely on each other
|
* Tasks cannot rely on each other.
|
||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
We highly recommend TypeScript as this module supports **TypeScript intellisense**.
|
We highly recommend TypeScript as this module supports **TypeScript intellisense**.
|
||||||
@ -43,9 +44,13 @@ We highly recommend TypeScript as this module supports **TypeScript intellisense
|
|||||||
import * as taskbuffer from "taskbuffer";
|
import * as taskbuffer from "taskbuffer";
|
||||||
|
|
||||||
myTask = new taskbuffer.Task({
|
myTask = new taskbuffer.Task({
|
||||||
|
preTask: someOtherTask // optional, don't worry loops are prevented
|
||||||
|
afterTask: someOtherTask // optional, don't worry loops are prevented
|
||||||
name:"myTask1",
|
name:"myTask1",
|
||||||
taskFunction:() => {
|
taskFunction:() => {
|
||||||
// do some stuff and return promise
|
// do some stuff and return promise
|
||||||
|
// pass on any data through promise resolution
|
||||||
|
// Use TypeScript for better understanding and code completion
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
```
|
```
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "taskbuffer",
|
"name": "taskbuffer",
|
||||||
"version": "0.1.1",
|
"version": "0.1.2",
|
||||||
"description": "Flexible task organization for gulp. TypeScript ready!",
|
"description": "Flexible task organization for gulp. TypeScript ready!",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
Reference in New Issue
Block a user