Copy all static files when versionedDeploy is used
()
| 670 | |
| 671 | /** Copy all static files when versionedDeploy is used */ |
| 672 | async function copyAllRequiredFiles() { |
| 673 | // dont copy files to themself |
| 674 | if (!versionObj.versionedDeploy) { |
| 675 | return; |
| 676 | } |
| 677 | |
| 678 | await Promise.all(pathsToCopy.map(async v => { |
| 679 | const resultPath = path.resolve(cwd, path.join('.', versionObj.versionedPath, v)); |
| 680 | await fsextra.copy(v, resultPath); |
| 681 | })); |
| 682 | } |
| 683 | |
| 684 | exports.default = renderFile; |
| 685 | exports.renderFile = renderFile; |