orgdo
Version:
Command-line tool to manage the Todo lists
22 lines (21 loc) • 689 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const Cli_1 = require("../../Cli");
const Client_1 = require("../../Client");
exports.command = ["done <id>", "complete"];
exports.describe = "Done task";
function builder(cmd) {
return cmd.positional("id", { describe: "Id of task", type: "number" });
}
exports.builder = builder;
function handler(options) {
Client_1.default.init().then(client => {
new Cli_1.default(client)
.done(options)
.then(task => {
Client_1.print(`Complete task ${task.id}.`);
})
.catch(err => Client_1.printErrorAndExit(err));
});
}
exports.handler = handler;