var argv = require('yargs').argv;
var command = argv._[0]
console.log(argv);

if (command === 'hello' && typeof argv.name !== 'undefind' && typeof argv.lastname !== 'undefined') {
	console.log('Hello ' + argv.name + ' ' + argv.lastname + '!');
} else if (command === 'hello' && typeof argv.name !== 'undefined') {
	console.log('Hello ' + argv.name + '!');
} else if (command === 'hello') {
	console.log('Hello world!');
}


// ABILITY TO CREATE NAMED ARGS IN TERMINAL
// $ node example-args.js hello --name Janet


var argv = require('yargs')
	.command('hello', 'Greets the user', function (yargs) {
		yargs.options({
			name: {
				demand: true,
				alias: 'n',
				description: 'Your first name goes here',
				type: 'string'
			},
			lastname: {
				demand: true,
				alias: 'l',
				description: 'Your last name goes here',
				type: 'string'
			}
		}).help('help');
	})
	.command('get', 'some description', function (yargs) {

	})
	.help('help')
	.argv;
var command = argv._[0];

console.log(argv);

if (command === 'hello' && typeof argv.name !== 'undefind' && typeof argv.lastname !== 'undefined') {
	console.log('Hello ' + argv.name + ' ' + argv.lastname + '!');
} else if (command === 'hello' && typeof argv.name !== 'undefined') {
	console.log('Hello ' + argv.name + '!');
} else if (command === 'hello') {
	console.log('Hello world!');
}

// ABILITY TO CREATE NAMED ARGS IN TERMINAL
// $ node example-args.js hello --name Janet

add help & yargs.command() options