Modern task runner / build tool.
Last updated 4 years ago by rem .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install tasco 
SYNC missed versions from official npm registry.


NPM version NPM downloads Build Status donate


npm i -g tasco


Populate a taskfile.js in your project:

// The default task
export default async function (t) {
  await t.parallel('css', 'js')

// Transform css using PostCSS
// Using postcss-cssnext
export async function css(t) {
  await t

// Transform js using Babel
// Using babel-preset-es2015
export async function js(t) {
  await t

Then fire the default task from command-line:

# or specific task
tasco js

Another neat feature, run tasco help to get information about all tasks.

You can using JavaScript comments to describe the tasks, it should be present right before the task. Both single-line and multi-line comments are supported. In tasco help only the first line of the description will be print, you can read full description for specific task via tasco help <taskname>

The description also supports templating.

Use a plugin

Just install a plugin in your project and it will be automatically loaded, plugin name follows the tasco-[name] convention.

Check out the doc for building a plugin.



You can use {{ expression }} in task description, we use vegito under the hood, for example:

// this task builds {{ chalk.yellow('js files') }}
export async function js(t) {
  await t.input().babel().output() //...

Available variables:

  • chalk: The chalk module.


t.input([globs]) or t.input(globA, globB...)


The directory to write files.


Run multiple tasks in parallel.


Run multiple tasks in sequence.


Run a single task.



Type: string
Requried: true

The property on t to bind plugin.

For example, if name is babel then you can use t.babel


Type: function
Required: true

The pipe function, eg, add a piper to compile js using Babel:

module.exports = {
  name: 'babel',
  pipe(options) {
    this.files.forEach((file, index) => {
      this.files[index].content = babel
        .transform(this.files[index].content, options)

The pipe function should return a Promise or perform synchronize operations.

Register plugin

Plugin can be installed from npm and automatically loaded. For testing plugin locally, you can use t.use function:

const plugin = {
  name: 'doSomething', 
  pipe() {}

export async function build(t) {
  await t.input().doSomething().output()


  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D


tasco © egoist, Released under the MIT License.
Authored and maintained by egoist with help from contributors (list).

egoistian.com · GitHub @egoist · Twitter @rem_rin_rin

Current Tags

  • 0.4.0                                ...           latest (4 years ago)

6 Versions

  • 0.4.0                                ...           4 years ago
  • 0.3.1                                ...           4 years ago
  • 0.3.0                                ...           4 years ago
  • 0.2.0                                ...           4 years ago
  • 0.1.0                                ...           4 years ago
  • 0.0.0                                ...           4 years ago
Maintainers (2)
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 2
Dependencies (14)
Dev Dependencies (2)
Dependents (0)

Copyright 2014 - 2016 © taobao.org |