文件操作 - cleanup.mjs
返回文件管理
返回主菜单
删除本文件
文件: /var/www/OLD/node_modules/@nuxt/cli/dist/chunks/cleanup.mjs
编辑文件内容
import { defineCommand } from 'citty'; import { resolve } from 'pathe'; import { l as loadKit } from '../shared/cli.DlcAx0De.mjs'; import { c as cleanupNuxtDirs } from '../shared/cli.CixXmuNe.mjs'; import { c as cwdArgs, b as legacyRootDirArgs } from '../shared/cli.TH4BiEd5.mjs'; import 'jiti'; import 'node:fs'; import 'ohash'; import '../shared/cli.CoNbGSsT.mjs'; import 'node:path'; import 'node:process'; import 'std-env'; import 'consola'; import 'node:url'; const cleanup = 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); } }); export { cleanup as default };
修改文件时间
将文件时间修改为当前时间的前一年
删除文件