UNPKG

rattail

Version:

A Vite+ oriented, AI Agent friendly front-end toolchain

18 lines (17 loc) 679 B
import { t as __exportAll } from "./rolldown-runtime-Dfn8tqD8.mjs"; import { n as isArray, t as isString } from "./isString-eoLxw4CX.mjs"; import { n as getConfig } from "./config-CpH0B9DB.mjs"; import { rimraf } from "rimraf"; //#region src/cli/clean.ts var clean_exports = /* @__PURE__ */ __exportAll({ clean: () => clean }); function resolveCleanPatterns(clean) { if (!clean) return []; if (isString(clean)) return [clean]; if (isArray(clean)) return clean; return clean.patterns ?? []; } async function clean(patterns) { await rimraf(patterns ?? resolveCleanPatterns((await getConfig()).clean), { glob: true }); } //#endregion export { clean_exports as n, clean as t };