lib/cli.js
function setupCliObject(argv) {
	// Set cli options
	cliOptions
		.version(packageJson.version)
		.usage('[options] <component_path ...>')
		.option('-v, --verbose',
			'Be verbose during tests. (cannot be used with --quiet or --silent)')
		.option('-q, --quiet',
			'Display only the final outcome.')
		.option('-s, --silent',
			'Suppress all output.')
		.option('-r, --recursive',
			'Recurse into local and external dependencies.')
		.option('-d, --dep-paths <paths>',
			'Colon separated list of paths to external dependencies. (default: "./components")')
		.option('-w, --warn-paths <paths>',
			'Colon separated list of paths where component errors will be converted to warnings. (supports minimatch globbing)')
		.option('-i, --ignore-paths <paths>',
			'Colon separated list of paths component-hint should ignore. (supports minimatch globbing)')
		.option('-l, --lookup-paths <paths>',
			'Colon separated list of paths to check for the existence of missing local ' +
			'dependencies. This is used to give the user a hint where they can find them.')
		.option('    --reporter <path>',
			'Path to reporter file to use for output formatting.',
			path.join(__dirname, './reporters/default.js'));

	// Cleanup option strings and re-format them
	formatOptionStrings(cliOptions.options, 100);

	// Add additional info at the bottom of our help
	cliOptions.on('--help', function () {
		var scriptName = path.basename(argv[1]);

		process.stdout.write('  Examples:\n');
		process.stdout.write('\n');
		process.stdout.write('    Check multiple component entry points\n');
		process.stdout.write('    $ ' + scriptName + ' /path/to/single/component /path/to/another/component\n');
		process.stdout.write('\n');
		process.stdout.write('    Check multiple component entry point which exist in the same folder\n');
		process.stdout.write('    $ ' + scriptName + ' /path/to/multiple/component/folder/*/\n');
		process.stdout.write('\n');
	});

	// Parse arguments
	cliOptions.parse(argv);
}
function setupCliObject(argv) {
	// Set cli options
	cliOptions
		.version(packageJson.version)
		.usage('[options] <component_path ...>')
		.option('-v, --verbose',
			'Be verbose during tests. (cannot be used with --quiet or --silent)')
		.option('-q, --quiet',
			'Display only the final outcome.')
		.option('-s, --silent',
			'Suppress all output.')
		.option('-r, --recursive',
			'Recurse into local and external dependencies.')
		.option('-d, --dep-paths <paths>',
			'Colon separated list of paths to external dependencies. (default: "./components")')
		.option('-w, --warn-paths <paths>',
			'Colon separated list of paths where component errors will be converted to warnings. (supports minimatch globbing)')
		.option('-i, --ignore-paths <paths>',
			'Colon separated list of paths component-hint should ignore. (supports minimatch globbing)')
		.option('-l, --lookup-paths <paths>',
			'Colon separated list of paths to check for the existence of missing local ' +
			'dependencies. This is used to give the user a hint where they can find them.')
		.option('    --reporter <path>',
			'Path to reporter file to use for output formatting.',
			path.join(__dirname, './reporters/default.js'));

	// Cleanup option strings and re-format them
	formatOptionStrings(cliOptions.options, 100);

	// Add additional info at the bottom of our help
	cliOptions.on('--help', function () {
		var scriptName = path.basename(argv[1]);

		process.stdout.write('  Examples:\n');
		process.stdout.write('\n');
		process.stdout.write('    Check multiple component entry points\n');
		process.stdout.write('    $ ' + scriptName + ' /path/to/single/component /path/to/another/component\n');
		process.stdout.write('\n');
		process.stdout.write('    Check multiple component entry point which exist in the same folder\n');
		process.stdout.write('    $ ' + scriptName + ' /path/to/multiple/component/folder/*/\n');
		process.stdout.write('\n');
	});

	// Parse arguments
	cliOptions.parse(argv);
}
function setupCliObject ( argv ) { // Set cli options cliOptions . version ( packageJson . version ) . usage ( '[options] <component_path ...>' ) . option ( '-v, --verbose' , 'Be verbose during tests. (cannot be used with --quiet or --silent)' ) . option ( '-q, --quiet' , 'Display only the final outcome.' ) . option ( '-s, --silent' , 'Suppress all output.' ) . option ( '-r, --recursive' , 'Recurse into local and external dependencies.' ) . option ( '-d, --dep-paths <paths>' , 'Colon separated list of paths to external dependencies. (default: "./components")' ) . option ( '-w, --warn-paths <paths>' , 'Colon separated list of paths where component errors will be converted to warnings. (supports minimatch globbing)' ) . option ( '-i, --ignore-paths <paths>' , 'Colon separated list of paths component-hint should ignore. (supports minimatch globbing)' ) . option ( '-l, --lookup-paths <paths>' , 'Colon separated list of paths to check for the existence of missing local ' + 'dependencies. This is used to give the user a hint where they can find them.' ) . option ( '    --reporter <path>' , 'Path to reporter file to use for output formatting.' , path . join ( __dirname , './reporters/default.js' ) ) ; // Cleanup option strings and re-format them formatOptionStrings ( cliOptions . options , 100 ) ; // Add additional info at the bottom of our help cliOptions . on ( '--help' , function ( ) { var scriptName = path . basename ( argv [ 1 ] ) ; process . stdout . write ( '  Examples:\n' ) ; process . stdout . write ( '\n' ) ; process . stdout . write ( '    Check multiple component entry points\n' ) ; process . stdout . write ( '    $ ' + scriptName + ' /path/to/single/component /path/to/another/component\n' ) ; process . stdout . write ( '\n' ) ; process . stdout . write ( '    Check multiple component entry point which exist in the same folder\n' ) ; process . stdout . write ( '    $ ' + scriptName + ' /path/to/multiple/component/folder/*/\n' ) ; process . stdout . write ( '\n' ) ; } ) ; // Parse arguments cliOptions . parse ( argv ) ; }
Function which sets up the commander object with all of our options and customisations.

@param {Array} argv
@returns {undefined}
Function which sets up the commander object with all of our options and customisations .