src/generators/shared/utils/getIntro.js/getUmdIntro
function getUmdIntro ( options, imports ) {
	if ( !options.name ) {
		throw new Error( `Missing required 'name' option for UMD export` );
	}

	const amdId = options.amd && options.amd.id ? `'${options.amd.id}', ` : '';

	const amdDeps = imports.length ? `[${imports.map( declaration => `'${removeExtension( declaration.source.value )}'` ).join( ', ')}], ` : '';
	const cjsDeps = imports.map( declaration => `require('${declaration.source.value}')` ).join( ', ' );
	const globalDeps = getGlobals( imports, options );

	return deindent`
		(function ( global, factory ) {
			typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(${cjsDeps}) :
			typeof define === 'function' && define.amd ? define(${amdId}${amdDeps}factory) :
			(global.${options.name} = factory(${globalDeps}));
		}(this, (function (${paramString( imports )}) { 'use strict';` + '\n\n';
}