Created
November 24, 2020 09:47
-
-
Save Josh4324/6aa0a58b8e2a0db6fc8ea4465c9c6fca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const yargs = require("yargs"); | |
const utils = require("./utils"); | |
yargs.command({ | |
command: "add", | |
describe: "Add a new todo", | |
builder: { | |
title: { | |
describe: "Todo title", | |
type: "string", | |
demandOption: true, | |
}, | |
todo: { | |
describe: "Todo Body", | |
type: "string", | |
demandOption: true, | |
}, | |
}, | |
handler: function (argv) { | |
utils.createTodo(argv.title, argv.todo) | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment