MCPcopy Create free account
hub / github.com/krausest/js-framework-benchmark / addLocalFolderIfExists

Function addLocalFolderIfExists

cli/zip.js:15–19  ·  view source on GitHub ↗

* Adds a directory to the zip archive, if it exists. * @param {string} sourcePath * @param {string} zipPath

(sourcePath, zipPath)

Source from the content-addressed store, hash-verified

13 * @param {string} zipPath
14 */
15function addLocalFolderIfExists(sourcePath, zipPath) {
16 if (fs.existsSync(sourcePath)) {
17 zip.addLocalFolder(sourcePath, zipPath);
18 }
19}
20
21/**
22 * Adds a file to the zip archive, if it exists.

Callers 1

addFrameworksToZipFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected