@storm-software/esbuild
Version:
A package containing `esbuild` utilities for building Storm Software libraries and applications
31 lines (29 loc) • 807 B
JavaScript
// src/assets.ts
import { copyAssets } from "@storm-software/build-tools";
import {
getStopwatch,
writeDebug
} from "@storm-software/config-tools/logger/console";
async function copyBuildAssets(context) {
if (!context.result?.errors.length && context.options.assets?.length) {
writeDebug(
` \u{1F4CB} Copying ${context.options.assets.length} asset files to output directory: ${context.outputPath}`,
context.workspaceConfig
);
const stopwatch = getStopwatch(`${context.options.name} asset copy`);
await copyAssets(
context.workspaceConfig,
context.options.assets ?? [],
context.outputPath,
context.options.projectRoot,
context.sourceRoot,
true,
false
);
stopwatch();
}
return context;
}
export {
copyBuildAssets
};