orgdo
Version:
Command-line tool to manage the Todo lists
22 lines (21 loc) • 675 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const Cli_1 = require("../../Cli");
const Client_1 = require("../../Client");
exports.command = "start <id>";
exports.describe = "Start 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)
.start(options)
.then(task => {
Client_1.print(`Start task ${task.id}.`);
})
.catch(err => Client_1.printErrorAndExit(err));
});
}
exports.handler = handler;