Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (!fs.existsSync(configPath)) {
return;
}
const config = JSON.parse(fs.readFileSync(configPath, 'utf8'));
if (config && config.copyTo) {
for (let destination in config.copyTo) {
const sources = config.copyTo[destination];
destination = path.resolve(process.cwd(), destination);
tasks.push(copyTask(sources.map(src => expandSourcePath(src)), destination));
}
}
return series.apply(null, tasks);
}