Compare commits

...

4 Commits

Author SHA1 Message Date
a347ded65a 0.1.3 2016-05-23 05:37:12 +02:00
3ce4b200db add typings to package.json 2016-05-23 05:36:55 +02:00
cd6407f189 0.1.2 2016-05-17 03:32:57 +02:00
ca2afbd8c7 improve Readme 2016-05-17 03:32:47 +02:00
2 changed files with 11 additions and 5 deletions

View File

@ -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
} }
}) })
``` ```

View File

@ -1,8 +1,9 @@
{ {
"name": "taskbuffer", "name": "taskbuffer",
"version": "0.1.1", "version": "0.1.3",
"description": "Flexible task organization for gulp. TypeScript ready!", "description": "Flexible task organization for gulp. TypeScript ready!",
"main": "dist/index.js", "main": "dist/index.js",
"typings": "dist/index.d.ts",
"scripts": { "scripts": {
"test": "(npmts)" "test": "(npmts)"
}, },