mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-16 10:54:49 +00:00
16 lines
404 B
TypeScript
16 lines
404 B
TypeScript
import { resolve } from 'pathe'
|
|
import { cleanupNuxtDirs } from '../utils/nuxt'
|
|
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)
|
|
}
|
|
})
|