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

Function addLocalFileIfExists

cli/zip.js:26–30  ·  view source on GitHub ↗

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

(sourcePath, zipPath)

Source from the content-addressed store, hash-verified

24 * @param {string} zipPath
25 */
26function addLocalFileIfExists(sourcePath, zipPath) {
27 if (fs.existsSync(sourcePath)) {
28 zip.addLocalFile(sourcePath, zipPath);
29 }
30}
31
32/**
33 * Adds frameworks to the zip archive.

Callers 1

addFrameworksToZipFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected