UNPKG

nuxi

Version:
30 lines (29 loc) 952 B
import { t as defineCommand } from "./dist-B03QHgrC.mjs"; import { a as legacyRootDirArgs, t as cwdArgs } from "./_shared-D6pJgr6t.mjs"; import { n as logger } from "./logger-CtlB9piy.mjs"; import { c as resolve } from "./pathe.M-eThtNZ-BfnU2wdd.mjs"; import { t as loadKit } from "./kit-Bx45zdA5.mjs"; import { t as cleanupNuxtDirs } from "./nuxt-BFsY6rFZ.mjs"; //#region src/commands/cleanup.ts var cleanup_default = defineCommand({ meta: { name: "cleanup", description: "Clean up generated Nuxt files and caches" }, args: { ...cwdArgs, ...legacyRootDirArgs }, async run(ctx) { const cwd = resolve(ctx.args.cwd || ctx.args.rootDir); const { loadNuxtConfig } = await loadKit(cwd); const nuxtOptions = await loadNuxtConfig({ cwd, overrides: { dev: true } }); await cleanupNuxtDirs(nuxtOptions.rootDir, nuxtOptions.buildDir); logger.success("Cleanup complete!"); } }); //#endregion export { cleanup_default as default };