tasks/font_loader.js
function formatingFontsArray(array) {
		var fileContent = '',
			file = [],
			buffer = array[0].split('.')[0],
			exp = [];

		function writeResult() {
			var str = buffer + ' [' + exp.join(', ') + ']';
			fileContent += str + '\n';
			grunt.log.ok(str);
		}

		array.forEach(function(item, i, arr) {
			file = item.split('.');
			if (buffer === file[0]) {
				exp.push(file[1]);
			} else {
				writeResult();
				buffer = file[0];
				exp = [];
				exp.push(file[1]);
			}
		});
		writeResult();

		//Put last search result into file
		grunt.file.mkdir(options.dest);
		grunt.file.write(normalizeDir(options.dest) + '.fonts', fileContent);
	}
function formatingFontsArray(array) {
		var fileContent = '',
			file = [],
			buffer = array[0].split('.')[0],
			exp = [];

		function writeResult() {
			var str = buffer + ' [' + exp.join(', ') + ']';
			fileContent += str + '\n';
			grunt.log.ok(str);
		}

		array.forEach(function(item, i, arr) {
			file = item.split('.');
			if (buffer === file[0]) {
				exp.push(file[1]);
			} else {
				writeResult();
				buffer = file[0];
				exp = [];
				exp.push(file[1]);
			}
		});
		writeResult();

		//Put last search result into file
		grunt.file.mkdir(options.dest);
		grunt.file.write(normalizeDir(options.dest) + '.fonts', fileContent);
	}
function formatingFontsArray ( array ) { var fileContent = '' , file = [ ] , buffer = array [ 0 ] . split ( '.' ) [ 0 ] , exp = [ ] ; function writeResult ( ) { var str = buffer + ' [' + exp . join ( ', ' ) + ']' ; fileContent += str + '\n' ; grunt . log . ok ( str ) ; } array . forEach ( function ( item , i , arr ) { file = item . split ( '.' ) ; if ( buffer === file [ 0 ] ) { exp . push ( file [ 1 ] ) ; } else { writeResult ( ) ; buffer = file [ 0 ] ; exp = [ ] ; exp . push ( file [ 1 ] ) ; } } ) ; writeResult ( ) ; //Put last search result into file grunt . file . mkdir ( options . dest ) ; grunt . file . write ( normalizeDir ( options . dest ) + '.fonts' , fileContent ) ; }
Formating array with font into better readding
@param  {Array} array
Formating array with font into better readding