chore: restructure project and add i18n support
- Reorganize project structure with new electron and shared directories - Add comprehensive i18n support with Chinese, English, and Japanese locales - Update build configurations and TypeScript paths for new structure - Add various UI components including chat interface and task management - Include Windows release binaries and localization files - Update dependencies and fix import paths throughout the codebase
This commit is contained in:
@@ -1,23 +1,23 @@
|
||||
const { execSync } = require('child_process')
|
||||
const fs = require('fs-extra')
|
||||
const path = require('path')
|
||||
|
||||
function cleanOutRoot() {
|
||||
const outDir = path.resolve(process.cwd(), 'out')
|
||||
function cleanBuildDirectories() {
|
||||
const directoriesToRemove = [
|
||||
path.resolve(process.cwd(), 'dist'),
|
||||
path.resolve(process.cwd(), 'dist-electron'),
|
||||
path.resolve(process.cwd(), 'out'),
|
||||
]
|
||||
|
||||
if (!fs.pathExistsSync(outDir)) {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
fs.removeSync(outDir)
|
||||
|
||||
if (fs.pathExistsSync(outDir)) {
|
||||
execSync(`cmd /c rd /s /q "${outDir}"`, { stdio: 'ignore' })
|
||||
|
||||
process.exitCode = 1
|
||||
for (const dir of directoriesToRemove) {
|
||||
if (fs.pathExistsSync(dir)) {
|
||||
try {
|
||||
fs.removeSync(dir)
|
||||
console.log(`Removed: ${path.relative(process.cwd(), dir)}`)
|
||||
} catch (error) {
|
||||
console.warn(`Failed to remove ${dir}: ${error.message}`)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cleanOutRoot()
|
||||
|
||||
cleanBuildDirectories()
|
||||
Reference in New Issue
Block a user