qo
finally, a task runner designed for insect people
Last updated 4 years ago by refractalize .
BSD-2-Clause · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install qo 
SYNC missed versions from official npm registry.

qo

A task runner for insect people.

install

npm install qo

how to use

Write a file qo.js:

task('hi', function () {
  console.log('hi!');
});

Then

# qo hi
hi!

named arguments

task('hi', function (args, options) {
  console.log("hi " + options.name);
});

Then

# qo hi --name jack
hi jack

lists of arguments

task('hi', function (args) {
  console.log("hi " + args.join(', '));
});

Then

# qo hi jack jill jesse
hi jack, jill, jesse

promises

If you return a promise, and it's rejected, then qo will print the error exit with 1.

var fs = require('fs-promise');

task('print', function (args) {
  return fs.readFile(args[0], 'utf-8').then(function (contents) {
    console.log(contents);
  });
});

Then

# qo print some-file.txt
Error: ENOENT, open 'some-file.txt'
    at Error (native)

task descriptions

task('hi', {desc: 'says hi'}, function () {
  console.log('hi');
});

Then

# qo
tasks:

    hi, says hi

You can also put descriptive arguments into the task name:

task('hi <name>', {desc: 'says hi to <name>'}, function (args) {
  console.log('hi ' + args[0]);
});

Then

# qo
tasks:

    hi <name>, says hi to <name>

pogoscript

you can write a qo.pogo file too. Pogoscript happens to be very useful for writing heavily asynchronous code, and great for little scripts that get things done.

Current Tags

  • 1.4.0                                ...           latest (4 years ago)

23 Versions

  • 1.4.0                                ...           4 years ago
  • 1.3.0                                ...           5 years ago
  • 1.2.0                                ...           5 years ago
  • 1.1.0                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
  • 0.3.0                                ...           6 years ago
  • 0.2.3                                ...           6 years ago
  • 0.2.2                                ...           6 years ago
  • 0.2.1                                ...           6 years ago
  • 0.1.3                                ...           6 years ago
  • 0.1.2                                ...           6 years ago
  • 0.2.0                                ...           7 years ago
  • 0.1.1                                ...           7 years ago
  • 0.1.0                                ...           7 years ago
  • 0.0.10                                ...           7 years ago
  • 0.0.9                                ...           7 years ago
  • 0.0.8                                ...           7 years ago
  • 0.0.7                                ...           7 years ago
  • 0.0.6                                ...           7 years ago
  • 0.0.5                                ...           7 years ago
  • 0.0.4                                ...           7 years ago
  • 0.0.3                                ...           7 years ago
  • 0.0.1                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (6)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |