A Node-based tool for managing declarative web asset pipelines.
To install plumber, use
npm to install the
(globally for ease of use):
$ sudo npm install -g plumber-cli
For an introduction, you may want to read the blog post Abstracting away the grunt work with Plumber.
Plumbing.js file above defines two sample pipelines:
compile:js: Take all of the RequireJS config file, the main AMD
app.js file compiled by RequireJS, the file exported by the
underscore Bower component and the
pikaday.js file in the
mapping files in the
compile:css: Take all of the
reset.css file, the LESS files
compiled to CSS, and the CSS files exported by the
Bower component, concatenate them all into a single file named
style.css and write the result in the
You can run each individual pipeline with
plumber <pipeline> or
all of them with
Note: the syntax is still being defined and may change in the future.
Most web asset building can be described as a pipeline of operations. Each operation takes one or more files as input and returns one or more files as output. The output of an operation can be piped as input to the next operation, creating a linear pipeline. Typically, source files are fed to the pipeline and the generated files are written to a destination directory.
An operation should only be concerned about doing a single thing well, and it is asynchronous by default using RxJS. Performance optimisation such as parallelism and caching are outside the scope of operations; instead, they are the sole concern of Plumber.
File data is currently being passed as strings, rather than streams, because most libraries that operations wrap do not support streams natively anyway...
The most popular task runner. Tasks are completely independent and executed imperatively.
Both are stream-based pipelines of operations. The main difference with Plumber is the current lack of support for auxiliary files (e.g. sourcemaps) and the treatment of watch as a special listener which triggers a given block (e.g. re-run) on change.