src/init/index.js
function (callback) {
					if (!handlebarsMatcher.test(file)) {
						return callback();
					}

					render(file, metadata, function (err, res) {
						if (err) return callback(err);
						// safety check to prevent file deletion in case filename doesn't change
						if (file === res) return callback();
						// safety check to prevent overwriting another file
						if (files[res]) return callback(`Cannot rename file ${file} to ${res}. A file with that name already exists.`);

						// add entry for interpolated file name
						files[res] = files[file];
						// delete entry for template file name
						delete files[file];
						callback();
					});
				}
function (callback) {
					if (!handlebarsMatcher.test(file)) {
						return callback();
					}

					render(file, metadata, function (err, res) {
						if (err) return callback(err);
						// safety check to prevent file deletion in case filename doesn't change
						if (file === res) return callback();
						// safety check to prevent overwriting another file
						if (files[res]) return callback(`Cannot rename file ${file} to ${res}. A file with that name already exists.`);

						// add entry for interpolated file name
						files[res] = files[file];
						// delete entry for template file name
						delete files[file];
						callback();
					});
				}
function ( callback ) { if ( ! handlebarsMatcher . test ( file ) ) { return callback ( ) ; } render ( file , metadata , function ( err , res ) { if ( err ) return callback ( err ) ; // safety check to prevent file deletion in case filename doesn't change if ( file === res ) return callback ( ) ; // safety check to prevent overwriting another file if ( files [ res ] ) return callback ( ` ${ file } ${ res } ` ) ; // add entry for interpolated file name files [ res ] = files [ file ] ; // delete entry for template file name delete files [ file ] ; callback ( ) ; } ) ; }
interpolate the file name
interpolate the file name