update README

This commit is contained in:
Philipp Kunz 2016-05-17 03:27:29 +02:00
parent 19beb95e20
commit 7a3aed275f
2 changed files with 24 additions and 5 deletions

View File

@ -1,5 +1,5 @@
# taskbuffer
Flexible task organization for gulp.
Flexible task organization for gulp. TypeScript ready!
## Status
[![Coverage Status](https://coveralls.io/repos/github/pushrocks/taskbuffer/badge.svg?branch=master)](https://coveralls.io/github/pushrocks/taskbuffer?branch=master)
@ -12,7 +12,7 @@ npm install taskbuffer --save
## Concepts
#### Task
### class `Task`
* A Task in its most simple form is a function that is executed when the task runs.
* A Task can have a **preTask** and an **afterTask**
(those are run before or after the main function whenever the task is called)
@ -27,6 +27,25 @@ npm install taskbuffer --save
* Task.triggered() is an Observable stream that emits events every time a task call is called and every time a call is completed.
* Task is compatible to gulp streams.
#### Taskchain
* Multiple Tasks can be combined in a bigger task using a Taskchain. Taskchain extends Task.
### class `TaskChain`
* Multiple Tasks can be combined in a bigger task using a Taskchain.
* Taskchain extends Task.
* 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
### class `TaskParallel`
* like TaskChain, however **tasks run in parallel**
* Tasks cannot rely on each other
### Usage
We highly recommend TypeScript as this module supports **TypeScript intellisense**.
```
import * as taskbuffer from "taskbuffer";
myTask = new taskbuffer.Task({
name:"myTask1",
taskFunction:() => {
//do some stuff and return promise
}
})
```

View File

@ -1,7 +1,7 @@
{
"name": "taskbuffer",
"version": "0.1.0",
"description": "manage triggers and execution of tasks with promises",
"description": "Flexible task organization for gulp. TypeScript ready!",
"main": "dist/index.js",
"scripts": {
"test": "(npmts)"