tasks/webfont.js
function readTemplate(template, syntax, ext, optional) {
			var filename = template
				? path.resolve(template.replace(path.extname(template), ext))
				: path.join(__dirname, 'templates/' + syntax + ext)
			;
			if (fs.existsSync(filename)) {
				return {
					filename: filename,
					template: fs.readFileSync(filename, 'utf8')
				};
			}
			else if (!optional) {
				return grunt.fail.fatal('Cannot find template at path: ' + filename);
			}
		}
function readTemplate(template, syntax, ext, optional) {
			var filename = template
				? path.resolve(template.replace(path.extname(template), ext))
				: path.join(__dirname, 'templates/' + syntax + ext)
			;
			if (fs.existsSync(filename)) {
				return {
					filename: filename,
					template: fs.readFileSync(filename, 'utf8')
				};
			}
			else if (!optional) {
				return grunt.fail.fatal('Cannot find template at path: ' + filename);
			}
		}
function readTemplate ( template , syntax , ext , optional ) { var filename = template ? path . resolve ( template . replace ( path . extname ( template ) , ext ) ) : path . join ( __dirname , 'templates/' + syntax + ext ) ; if ( fs . existsSync ( filename ) ) { return { filename : filename , template : fs . readFileSync ( filename , 'utf8' ) } ; } else if ( ! optional ) { return grunt . fail . fatal ( 'Cannot find template at path: ' + filename ) ; } }
Reat the template file

@param {String} template Template file path
@param {String} syntax Syntax (bem, bootstrap, etc.)
@param {String} ext Extention of the template
@return {Object} {filename: 'Template filename', template: 'Template code'}
Reat the template file