@embeddable.com/sdk-core
Version:
Core Embeddable SDK module responsible for web-components bundling and publishing.
10 lines (8 loc) • 301 B
text/typescript
import * as fsP from "node:fs/promises";
import * as fs from "node:fs";
import { ResolvedEmbeddableConfig } from "./defineConfig";
export default async (ctx: ResolvedEmbeddableConfig) => {
if (fs.existsSync(ctx.client.buildDir)) {
await fsP.rm(ctx.client.buildDir, { recursive: true });
}
};