$ ~ npm install pliers -g
Essential features, nothing more
Pliers allows you to use JavaScript to write your build tasks like you would your applications. It has just three key features:
- Tasks - separate your build into runnable tasks, with dependency resolution
- Filesets - define a set of files based on a include and exclude patterns
- File watching - watch files and execute arbitrary code when they change
These important features are provided for you, then Pliers gets out of your way. There is no special API for tasks – you just write JavaScript. That way, you can leverage the buzzing ecosystem that is npm as your 'plugin' repository.
Do we really need another build tool?
Here in the Pliers camp, our previous build workflows often involved Makefiles. We are JS junkies, not make or bash experts.
Writing our build tasks in JS means…
- We can use the same quality assurance tools that we use on the rest of our stack
- We can leverage the thousands of available unit tested npm modules out there
- And we know the language inside out
There's no dispute that GNU Make is a powerful tool, but not only does it fail to line up with our love for JS – it lacks one vital feature that is a big use case for us: watching files for changes and performing certain actions.
Getting started
The GitHub README has the API nitty gritty, but here is a plain and simple example to get you started:
module.exports = task
function task(tasks) {
pliers('speak', function (done) {
console.log('Hello, world!')
done()
})
}