Files
vscode/extensions/copilot/script/build/copyStaticAssets.ts
kieferrm 333d9a4053 Hello Copilot
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2025-06-27 11:35:20 +02:00

19 lines
831 B
TypeScript

/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as path from 'path';
import * as fs from 'fs';
const REPO_ROOT = path.join(__dirname, '..', '..');
export async function copyStaticAssets(srcpaths: string[], dst: string): Promise<void> {
await Promise.all(srcpaths.map(async srcpath => {
const src = path.join(REPO_ROOT, srcpath);
const dest = path.join(REPO_ROOT, dst, path.basename(srcpath));
await fs.promises.mkdir(path.dirname(dest), { recursive: true });
await fs.promises.copyFile(src, dest);
}));
}