Wraps and saves data to '../client/components/phone-input/data.js'
@param {Object} data
function saveToFile( data ) {
	const scriptStr =
		'/** @format */\n' +
		'// Generated by build-metadata.js\n' +
		'/* eslint-disable */\n' +
		Object.keys( data )
			.map( key => `export const ${ key } = ${ JSON.stringify( data[ key ], null, '\t' ) };\n` )
			.join( '\n' ) +
		'/* eslint-enable */\n';
	const filePath = path.resolve(
		__dirname,
		'..',
		'client',
		'components',
		'phone-input',
		'data.js'
	);
	fs.writeFileSync( filePath, scriptStr );
}