tasks/respimg.js
function(callback) {
				async.each(task.files, function(file, callback2) {
					var srcPath = file.src[0],
						extName = path.extname(srcPath).toLowerCase();

					// if it’s an SVG or a PDF, copy the file to the output dir
					if (extName === '.svg' || extName === '.pdf') {
						var dstPath = getDestination(srcPath, file.dest, false, options);
						fs.copy(srcPath, dstPath, function(err){
							if (err) {
								grunt.fail.fatal(err);
							}

							outputFiles.push(dstPath);
							callback2(null);
						});
					} else {
						callback2(null);
					}

				}, callback);
			}
function(callback) {
				async.each(task.files, function(file, callback2) {
					var srcPath = file.src[0],
						extName = path.extname(srcPath).toLowerCase();

					// if it’s an SVG or a PDF, copy the file to the output dir
					if (extName === '.svg' || extName === '.pdf') {
						var dstPath = getDestination(srcPath, file.dest, false, options);
						fs.copy(srcPath, dstPath, function(err){
							if (err) {
								grunt.fail.fatal(err);
							}

							outputFiles.push(dstPath);
							callback2(null);
						});
					} else {
						callback2(null);
					}

				}, callback);
			}
function ( callback ) { async . each ( task . files , function ( file , callback2 ) { var srcPath = file . src [ 0 ] , extName = path . extname ( srcPath ) . toLowerCase ( ) ; // if it’s an SVG or a PDF, copy the file to the output dir if ( extName === '.svg' || extName === '.pdf' ) { var dstPath = getDestination ( srcPath , file . dest , false , options ) ; fs . copy ( srcPath , dstPath , function ( err ) { if ( err ) { grunt . fail . fatal ( err ) ; } outputFiles . push ( dstPath ) ; callback2 ( null ) ; } ) ; } else { callback2 ( null ) ; } } , callback ) ; }
copy SVGs and PDFs
copy SVGs and PDFs