@bliles/plug-pipeline

0.1.5 • Public • Published

Plug

A promise based task runner inspired by the task organization features of gulp.

The goal of this project is to provide a way to organize and run tasks that are simply JS promises in a build pipeline. The project makes no assumptions about the tasks you need to run in your pipeline.

Setup

Create a pipeline.js file with your tasks.

import plug from '@bliles/plug-pipeline';

plug.task('clean', async () => {
    // ...
});

plug.task('build:js', async () => {
    // ...
});

plug.task('build:styles', async () => {
    // ...
});

plug.task('default', plug.series('clean', plug.parallel('build:js', 'build:styles')));

Running your pipeline

Install the package globally to have plug available on the command line.

npm install -g @bliles/plug-pipeline

Then you can simply run plug in the path with your pipeline.js file.

Alternatively you can add an npm script that references the local node_modules:

{
...
  "scripts": {
    "plug": "node ./node_modules/.bin/plug",
  }
...

Package Sidebar

Install

npm i @bliles/plug-pipeline

Weekly Downloads

39

Version

0.1.5

License

MIT

Unpacked Size

6.17 kB

Total Files

5

Last publish

Collaborators

  • bliles