Untitled

mail@pastecode.io avatar
unknown
javascript
2 years ago
594 B
24
Indexable
Never
const yargs = require("yargs/yargs");
const { hideBin } = require("yargs/helpers");

const getNotes = require("./notes.js");

yargs(hideBin(process.argv))
  .version("1.1.0")
  .command("add", "add notes", {
      title: {
          describe: "Note Title",
          demandOption: true,
          type: 'string'
      }
  }, (argv) => {
    console.log("adding note ! " + argv.title);
  })
  .command("remove", "remove notes", () => {
    console.log("removing note ! ");
  })
  .command("list", "list notes", () => {
    console.log("listing note ! ");
  })
  .command(readCommand)
  .parse();