Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (!replacements) {
replacements = {};
}
const contentChangedCallback = alwaysOverwrite ? (_, contentChanged) =>
alwaysOverwriteContentChangedCallback(
srcPath,
relativeDestPath,
contentChanged
) : (_, contentChanged) =>
upgradeFileContentChangedCallback(
srcPath,
relativeDestPath,
contentChanged
);
copyAndReplace(
srcPath,
path.join(destRoot, relativeDestPath),
replacements,
contentChangedCallback
);
}
if (!replacements) {
replacements = {};
}
const contentChangedCallback = alwaysOverwrite ? (_, contentChanged) =>
alwaysOverwriteContentChangedCallback(
srcPath,
relativeDestPath,
contentChanged
) : (_, contentChanged) =>
upgradeFileContentChangedCallback(
srcPath,
relativeDestPath,
contentChanged
);
copyAndReplace(
srcPath,
path.join(destRoot, relativeDestPath),
replacements,
contentChangedCallback
);
}