mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-16 19:04:48 +00:00
16 lines
402 B
TypeScript
16 lines
402 B
TypeScript
|
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)
|
||
|
}
|
||
|
})
|