Skip to content

bliles/plug-pipeline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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",
  }
...

About

Promise based task runner

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published