build/lib/optimize.ts/optimizeTask
export function optimizeTask(opts: IOptimizeTaskOpts): () => NodeJS.ReadWriteStream {
	return function () {
		const optimizers = [optimizeAMDTask(opts.amd)];
		if (opts.commonJS) {
			optimizers.push(optimizeCommonJSTask(opts.commonJS));
		}

		if (opts.manual) {
			optimizers.push(optimizeManualTask(opts.manual));
		}

		return es.merge(...optimizers).pipe(gulp.dest(opts.out));
	};
}