diff --git a/README.md b/README.md index 7aca92e..e619050 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,27 @@ Overview * ```state```: NOT_RUNNING | RUNNING. * ```isLoadingTakingPlace```: onLoadMore function is taking place. +Usage +----- +```javascript +var JobManager = require('job-manager').JobManager; +var jm = new JobManager({ configuration options}); +jm.tasks = tasks; +jm.onLoadMore = function(cb){// code; if( !tasks ){ this.endReached = true; } cb()} +jm.work = function(task, worker,cb){ // worker.process( task, cb ); } +jm.onError = function( err, task, worker){ log( err, task, worker ); } +jm.onStopped = function(){ // log('Finished'); cb(); } +jm.start(); +// jm.stop(); +``` Demo ---- A pure javascript demo at http://harish2704.github.io/jobmanager-demo/test.html will give a more cleat idea. This demo uses the same JobManager class to do the animation. + + +Self promotion +-------------- +* I am a javascript freelancer. You can hire me. +* star my repos. + diff --git a/package.json b/package.json index 293fe66..3d14c62 100644 --- a/package.json +++ b/package.json @@ -16,11 +16,7 @@ "email": "harish2704@gmail.com" }, "license": "BSD-2-Clause", - "readme": "ERROR: No README data found!", + "readme": "README.md", "_id": "job-manager@0.0.1", - "dist": { - "shasum": "06c8c7558143c473f748db83876de9d0a449c764" - }, - "_resolved": "git+https://github.com/harish2704/node-job-manager#971f97e5f5985d58614fd3dbcca583dba250e964", "_from": "git+https://github.com/harish2704/node-job-manager" }