Nuxt/packages/nuxi/src/commands/cleanup.ts

16 lines
402 B
TypeScript
Raw Normal View History

import { resolve } from 'pathe'
import { cleanupNuxtDirs } from '../utils/fs'
import { defineNuxtCommand } from './index'
export default defineNuxtCommand({
meta: {
name: 'cleanup',
usage: 'npx nuxi clean|cleanup',
description: 'Cleanup generated nuxt files and caches'
},
async invoke (args) {
const rootDir = resolve(args._[0] || '.')
await cleanupNuxtDirs(rootDir)
}
})