How to use the package function from commander

Find comprehensive JavaScript commander.package code examples handpicked from public code repositorys.

12
13
14
15
16
17
18
19
20
21
22
23
	.option('-p, --package [value]', 'if specified, package all templates from destination folder into specified file')
	.parse(process.argv);


if (program.dest) mkdirordie(program.dest);
if (program.package) {
	var li = program.package.lastIndexOf('/');
	if (li>0) mkdirordie(program.package.substring(0, li));
}


function mkdirordie(path) {
fork icon0
star icon0
watch icon0

Other functions in commander

Sorted by popularity

function icon

commander.Option is the most popular function in commander (1786 examples)