anathon
Version:
A sweet and simple Node.js command-line tool that lets you express your love to your loved ones with personalized messages. Whether it's for your partner, friend, or family, this tool adds a little love to your terminal!
19 lines (12 loc) • 638 B
JavaScript
const { program } = require('commander');
program
.version('1.0.0')
.description('It is a tool for your loved ones !!')
.requiredOption('-n, --name <name>', 'Name of the person you love', 'World') // --name or -n switch
.requiredOption('-r, --relation', 'Relation with the person') // --exclamation switch
.requiredOption('-z, --nickname', 'Nick name of the person') // --exclamation switch
.parse(process.argv);
const options = program.opts();
const greeting = `Hello ${options.name} !! My ${options.relation} I love you a lot with all my hear and soul ${options.nickname}`
console.log(greeting);