UNPKG

@nuxt/cli

Version:
25 lines (24 loc) • 839 B
import { h as defineCommand, l as rootDirArgs } from "./_shared-B9W-9akb.mjs"; import { t as loadKit } from "./kit-CAB8i9G1.mjs"; import { h as logger } from "./startup-clock-SyYej6uN.mjs"; import { t as cleanupNuxtDirs } from "./nuxt-CrPGYmGr.mjs"; import { i as resolveRootDir } from "./paths-BipyohVL.mjs"; // src/commands/cleanup.ts var cleanup_default = defineCommand({ meta: { name: "cleanup", description: "Clean up generated Nuxt files and caches" }, args: { ...rootDirArgs }, async run(ctx) { const cwd = resolveRootDir(ctx.args); const { loadNuxtConfig } = await loadKit(cwd); const nuxtOptions = await loadNuxtConfig({ cwd, overrides: { dev: true } }); await cleanupNuxtDirs(nuxtOptions.rootDir, nuxtOptions.buildDir); logger.success("Cleanup complete!"); } }); export { cleanup_default as default };