function createExtension()

in src/index.js [20:48]


function createExtension() {
	/**
	*	Arguments:
	*	--company - name of the company or person making the extension.
	*	--tool - name of the tool / extension that is being built.
	*	--version - tag of the version to use.
	**/
	let normalizedCompany = normalizeString(argv.company ? argv.company : '');
	let normalizedTool = normalizeString(argv.tool ? argv.tool : '');

	let version = argv.version ? argv.version.toLowerCase() : '';
	let extensionType = argv.solution ? 'solution' : 'tool';
	let normalizedSolution = argv.solution ? normalizeString(argv.solution) : '';

	if (argv.length === 0 || !isValidVersion(version) || !normalizedCompany || !normalizedTool) {
		console.error('Usage: wac create --company <company-name> --name <tool-name> --version <version-tag> [--verbose]');
		console.log('or');
		console.log('wac create --company <company-name> --solution <solution-name> --tool <tool-name> --type <tool-type> --version <version-tag> [--verbose]');
		console.log('Valid version tags: \'legacy\', \'latest\', \'insider\', \'next\', \'experimental\'');
		console.log('More information can be found here:');
		process.exit(1);
	}

	if (normalizedSolution === '') {
		create(extensionType, normalizedCompany, normalizedTool, '', version);
	} else {
		create(extensionType, normalizedCompany, normalizedSolution, normalizedTool, version);
	}
}