serverless
Version:
Serverless Framework - Build web, mobile and IoT applications with serverless architectures using AWS Lambda, Azure Functions, Google CloudFunctions & more
17 lines (12 loc) • 440 B
JavaScript
;
const path = require('path');
const fse = require('./fse');
const walkDirSync = require('./walkDirSync');
function fileExists(srcDir, destDir, options) {
const fullFilesPaths = walkDirSync(srcDir, options);
fullFilesPaths.forEach(fullFilePath => {
const relativeFilePath = fullFilePath.replace(srcDir, '');
fse.copySync(fullFilePath, path.join(destDir, relativeFilePath));
});
}
module.exports = fileExists;