start-concurrent

0.1.0 • Public • Published

start-concurrent

npm linux build windows build coverage deps

Concurrent tasks runner for Start.

Install

npm install --save-dev start-concurrent
# or 
yarn add --dev start-concurrent

Usage

import Start from 'start';
import reporter from 'start-pretty-reporter';
import concurrent from 'start-concurrent';
 
const start = Start(reporter());
 
const task1 = () => {
  return function task1() {
    return new Promise((resolve) => {
      setTimeout(() => {
        resolve();
      }, 200);
    });
  };
};
 
const task2 = () => {
  return function task2() {
    return new Promise((resolve) => {
      setTimeout(() => {
        resolve();
      }, 100);
    });
  };
};
 
export const task12 = () => start(
  concurrent(
    task1,
    task2
  )
);
→ concurrent: start

→ task1: start

→ task2: start
→ task2: done

→ task1: done

→ concurrent: done

See documentation for details.

Package Sidebar

Install

npm i start-concurrent

Weekly Downloads

3

Version

0.1.0

License

MIT

Last publish

Collaborators

  • deepsweet