src/vs/nls.build.ts/writeFile
export function writeFile(pluginName: string, moduleName: string, req: AMDLoader.IRelativeRequire, write: AMDLoader.IPluginWriteFileCallback, config: AMDLoader.IConfigurationOptions): void {
	if (entryPoints.hasOwnProperty(moduleName)) {
		const fileName = req.toUrl(moduleName + '.nls.js');
		const contents = [
			'/*---------------------------------------------------------',
			' * Copyright (c) Microsoft Corporation. All rights reserved.',
			' *--------------------------------------------------------*/'
		],
			entries = entryPoints[moduleName];

		const data: { [moduleName: string]: string[] } = {};
		for (let i = 0; i < entries.length; i++) {
			data[entries[i]] = buildMap[entries[i]];
		}

		contents.push('define("' + moduleName + '.nls", ' + JSON.stringify(data, null, '\t') + ');');
		write(fileName, contents.join('\r\n'));
	}
}