diff --git a/README.md b/README.md index 9cde55b..422815f 100644 --- a/README.md +++ b/README.md @@ -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 + } +}) +``` \ No newline at end of file diff --git a/package.json b/package.json index f041fde..97ce97d 100644 --- a/package.json +++ b/package.json @@ -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)"