start-concurrent
v0.1.0
Published
Concurrent tasks runner for Start
Downloads
10,068
Readme
start-concurrent
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.