taks
v1.0.1
Published
Minimalistic ES7 async/await task runner
Downloads
4
Maintainers
Readme
taks
Minimalistic ES7 async/await based task runner.
Zero dependencies, no installation of taks-*
plugins necessary (please don't write any!). It expects the consumer to provide all the necessary transforms, preserving full access to the original APIs and flexibility.
Usage
Create a task.js
file at the root of your project:
const task = require('taks')
task('styles', async function () {
await postcss('./entry.css', './dist/output.css')
})
task('scripts', async function () {
await rollup('./entry.js', './dist/output.js')
})
task('build', async function () {
task.parallel(['scripts', 'styles'])
})
task.run(process.argv[2])
Then run node task build
to trigger the build
task.
Transform plugins
For a more complete example showing more complex usage of flow control, and implemenntation of rollup, postcss and uglify transforms, see this sample task.js file.
This is the spiritual successor of flour and cake-async that originally used CoffeeScript and a bit of trickery to create async
tasks (back in 2013!). Inspired by taskr with a slightly different philosophy.
License
MIT Licensed (http://ricardo.mit-license.org)