mirror of
https://github.com/LibreChat-AI/librechat.ai.git
synced 2026-03-27 10:48:32 +07:00
initial commit
This commit is contained in:
17
scripts/clean-cache.ts
Normal file
17
scripts/clean-cache.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
const { execSync } = require('child_process')
|
||||
const os = require('os')
|
||||
|
||||
function cleanCache() {
|
||||
const isWindows = os.platform() === 'win32'
|
||||
const npmCommand = 'pnpm next-sitemap'
|
||||
const removeCacheCommand = isWindows ? 'rmdir /s /q .next\\cache' : 'rm -rf .next/cache'
|
||||
|
||||
try {
|
||||
execSync(`${npmCommand} && ${removeCacheCommand}`, { stdio: 'inherit', shell: true })
|
||||
} catch (error) {
|
||||
console.error('Error cleaning cache:', error)
|
||||
process.exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
cleanCache()
|
||||
Reference in New Issue
Block a user