function rewriteFile(args, generator) {
    args.path = args.path || process.cwd();
    const fullPath = path.join(args.path, args.file);

    args.haystack = generator.fs.read(fullPath);
    const body = rewrite(args);
    generator.fs.write(fullPath, body);
}
function rewriteFile(args, generator) {
    args.path = args.path || process.cwd();
    const fullPath = path.join(args.path, args.file);

    args.haystack = generator.fs.read(fullPath);
    const body = rewrite(args);
    generator.fs.write(fullPath, body);
}
function rewriteFile ( args , generator ) { args . path = args . path || process . cwd ( ) ; const fullPath = path . join ( args . path , args . file ) ; args . haystack = generator . fs . read ( fullPath ) ; const body = rewrite ( args ) ; generator . fs . write ( fullPath , body ) ; }
Rewrite file with passed arguments
@param {object} args argument object (containing path, file, haystack, etc properties)
@param {object} generator reference to the generator
Rewrite file with passed arguments
Rewrite a file