UNPKG

@storm-software/unbuild

Version:

A package containing `unbuild` utilities for building Storm Software libraries and applications

22 lines (19 loc) 561 B
import { getStopwatch, writeDebug } from "./chunk-DY4PAY36.js"; // src/clean.ts import { rm } from "node:fs/promises"; async function clean(name = "Unbuild", directory, config) { writeDebug(` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config); const stopwatch = getStopwatch(`${name} output clean`); await cleanDirectories(name, directory, config); stopwatch(); } async function cleanDirectories(name = "Unbuild", directory, config) { await rm(directory, { recursive: true, force: true }); } export { clean, cleanDirectories };